From c350a127cd22eff2589ecadd1ebce1ab52cdc00c Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 9 Jan 2019 10:32:25 +0100 Subject: [PATCH] STYLE: add compile-time deprecated message for face/triangle normal() - in 1812 propagated through the distinction between areaNormal and unitNormal (issue #885). In older versions, the normal() always meant the area-normal for certain of these primitive. However, the .org version changed this to now return the unit-normal instead, but with the same method name. Thus add the deprecated message to avoid future inadvertent uses of normal() without being certain which one is being meant. --- src/OpenFOAM/meshes/meshShapes/face/face.H | 3 ++- src/OpenFOAM/meshes/meshShapes/triFace/triFace.H | 3 ++- src/OpenFOAM/meshes/primitiveShapes/triangle/triangle.H | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/OpenFOAM/meshes/meshShapes/face/face.H b/src/OpenFOAM/meshes/meshShapes/face/face.H index 1974d557c8..ecc69a1903 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/face.H +++ b/src/OpenFOAM/meshes/meshShapes/face/face.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2017-2018 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2017-2019 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -201,6 +201,7 @@ public: //- Legacy name for areaNormal() // \deprecated(2018-06) Deprecated for new use inline vector normal(const UList& p) const + FOAM_DEPRECATED_FOR(2018-12, "areaNormal() or unitNormal()") { return areaNormal(p); // Legacy definition } diff --git a/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H b/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H index 378b3d6e40..0b0b1c5e42 100644 --- a/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H +++ b/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2017-2018 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2017-2019 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -132,6 +132,7 @@ public: //- Legacy name for areaNormal() // \deprecated(2018-06) Deprecated for new use inline vector normal(const UList& points) const + FOAM_DEPRECATED_FOR(2018-12, "areaNormal() or unitNormal()") { return areaNormal(points); // Legacy definition } diff --git a/src/OpenFOAM/meshes/primitiveShapes/triangle/triangle.H b/src/OpenFOAM/meshes/primitiveShapes/triangle/triangle.H index de40051cfb..40415286ce 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/triangle/triangle.H +++ b/src/OpenFOAM/meshes/primitiveShapes/triangle/triangle.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2018-2019 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -215,6 +215,7 @@ public: //- Legacy name for areaNormal(). // \deprecated(2018-06) Deprecated for new use inline vector normal() const + FOAM_DEPRECATED_FOR(2018-12, "areaNormal() or unitNormal()") { return areaNormal(); }