From c61466b6e524955e46595531f24166d21544e893 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 31 May 2024 12:42:52 +0100 Subject: [PATCH] ENH: polyPatch cached areaFraction setter with uniform fraction STYLE: polyPatch cached areaFraction as std::unique_ptr - more consistent with other demand-driven data. Getter now returns tmp field instead of const reference. --- .../polyPatches/polyPatch/polyPatch.C | 60 ++++++++++--------- .../polyPatches/polyPatch/polyPatch.H | 19 +++--- ...ureForceBaffleVelocityFvPatchVectorField.C | 41 +++---------- .../wallDistAddressing/wallDistAddressing.C | 2 +- .../basic/InteractionLists/InteractionLists.C | 2 +- .../cyclicAMIPolyPatch/cyclicAMIPolyPatch.C | 12 ++-- .../algorithms/MeshWave/FaceCellWave.C | 2 +- src/meshTools/cellDist/cellDistFuncs.C | 4 +- .../cellDist/patchWave/patchDataWave.C | 2 +- src/meshTools/cellDist/patchWave/patchWave.C | 2 +- 10 files changed, 63 insertions(+), 83 deletions(-) diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C index bc132c24ab..db304f4b2e 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2018-2023 OpenCFD Ltd. + Copyright (C) 2018-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -95,9 +95,7 @@ Foam::polyPatch::polyPatch bm.mesh().points() ), start_(start), - boundaryMesh_(bm), - faceCellsPtr_(nullptr), - mePtr_(nullptr) + boundaryMesh_(bm) { if (constraintType(patchType)) { @@ -124,9 +122,7 @@ Foam::polyPatch::polyPatch bm.mesh().points() ), start_(start), - boundaryMesh_(bm), - faceCellsPtr_(nullptr), - mePtr_(nullptr) + boundaryMesh_(bm) {} @@ -151,9 +147,7 @@ Foam::polyPatch::polyPatch bm.mesh().points() ), start_(dict.get