From 6e17bf616ec6f8d660f0411f1b26362b1cac69cc Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@esi-group.com> Date: Fri, 19 Jul 2019 08:33:04 +0200 Subject: [PATCH] ENH: add global identity cartesian and cylindrical systems (#863) --- src/meshTools/coordinate/systems/cartesianCS.C | 5 ++++- src/meshTools/coordinate/systems/cartesianCS.H | 8 +++++++- src/meshTools/coordinate/systems/cylindricalCS.C | 5 ++++- src/meshTools/coordinate/systems/cylindricalCS.H | 6 ++++++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/meshTools/coordinate/systems/cartesianCS.C b/src/meshTools/coordinate/systems/cartesianCS.C index 28a209568b8..50a0a09c58b 100644 --- a/src/meshTools/coordinate/systems/cartesianCS.C +++ b/src/meshTools/coordinate/systems/cartesianCS.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2014 OpenFOAM Foundation @@ -40,6 +40,9 @@ namespace coordSystem } +const Foam::coordSystem::cartesian Foam::coordSystem::cartesian::null; + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::coordSystem::cartesian::cartesian() diff --git a/src/meshTools/coordinate/systems/cartesianCS.H b/src/meshTools/coordinate/systems/cartesianCS.H index b5ed32bcc1a..4a593c39a75 100644 --- a/src/meshTools/coordinate/systems/cartesianCS.H +++ b/src/meshTools/coordinate/systems/cartesianCS.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2013 OpenFOAM Foundation @@ -66,6 +66,12 @@ public: TypeNameNoDebug("cartesian"); + // Static Members + + //- Global (identity) cartesian coordinate system + static const cartesian null; + + // Constructors //- Construct null. This is an identity coordinateSystem. diff --git a/src/meshTools/coordinate/systems/cylindricalCS.C b/src/meshTools/coordinate/systems/cylindricalCS.C index 286f3ecc4ae..9c01f3f2067 100644 --- a/src/meshTools/coordinate/systems/cylindricalCS.C +++ b/src/meshTools/coordinate/systems/cylindricalCS.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -41,6 +41,9 @@ namespace coordSystem } +const Foam::coordSystem::cylindrical Foam::coordSystem::cylindrical::null; + + // * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * // namespace Foam diff --git a/src/meshTools/coordinate/systems/cylindricalCS.H b/src/meshTools/coordinate/systems/cylindricalCS.H index d7262f6489b..06d9fe4d9b2 100644 --- a/src/meshTools/coordinate/systems/cylindricalCS.H +++ b/src/meshTools/coordinate/systems/cylindricalCS.H @@ -105,6 +105,12 @@ public: TypeNameNoDebug("cylindrical"); + // Static Members + + //- Global (identity) cylindrical coordinate system + static const cylindrical null; + + // Constructors //- Construct null (identity coordinateSystem) -- GitLab