From 8c13ec4a8a845aa33549c56bfbb456d6b58abccc Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Thu, 11 Aug 2022 15:15:43 +0100 Subject: [PATCH] polyPatch: Removed unnecessary constructors and clone functions Poly patches should not hold non-uniform physical data that needs mapping on mesh changes (decomposition, reconstruction, topology change, etc ...). They should only hold uniform data that can be user-specified, or non-uniform data that can be constructed on the fly from the poly mesh. With the recent changes to mappedPatchBase and extrudeToRegionMesh, this has now been consistenly enforced, and a number of incomplete implementations of poly patch mapping have therefore been removed. --- .../splitMeshRegions/splitMeshRegions.C | 3 - .../basic/coupled/coupledPolyPatch.C | 15 - .../basic/coupled/coupledPolyPatch.H | 10 - .../basic/generic/genericPolyPatch.C | 17 +- .../basic/generic/genericPolyPatch.H | 26 -- .../constraint/cyclic/cyclicPolyPatch.C | 22 -- .../constraint/cyclic/cyclicPolyPatch.H | 26 -- .../cyclicSlip/cyclicSlipPolyPatch.H | 36 --- .../constraint/empty/emptyPolyPatch.C | 15 +- .../constraint/empty/emptyPolyPatch.H | 28 +- .../constraint/internal/internalPolyPatch.C | 15 +- .../constraint/internal/internalPolyPatch.H | 28 +- .../constraint/processor/processorPolyPatch.C | 18 -- .../constraint/processor/processorPolyPatch.H | 33 -- .../processorCyclicPolyPatch.C | 16 - .../processorCyclicPolyPatch.H | 33 -- .../constraint/symmetry/symmetryPolyPatch.C | 15 +- .../constraint/symmetry/symmetryPolyPatch.H | 28 +- .../symmetryPlane/symmetryPlanePolyPatch.C | 16 +- .../symmetryPlane/symmetryPlanePolyPatch.H | 35 +- .../constraint/wedge/wedgePolyPatch.C | 21 +- .../constraint/wedge/wedgePolyPatch.H | 28 +- .../polyPatches/derived/wall/wallPolyPatch.C | 15 +- .../polyPatches/derived/wall/wallPolyPatch.H | 28 +- .../polyPatches/polyPatch/polyPatch.C | 27 -- .../polyPatches/polyPatch/polyPatch.H | 26 -- .../mergedCyclic/mergedCyclicPolyPatch.C | 15 +- .../mergedCyclic/mergedCyclicPolyPatch.H | 35 +- .../cyclicAMIPolyPatch/cyclicAMIPolyPatch.C | 25 -- .../cyclicAMIPolyPatch/cyclicAMIPolyPatch.H | 34 -- .../mappedExtrudedWallPolyPatch.C | 14 - .../mappedExtrudedWallPolyPatch.H | 33 -- .../mappedPolyPatch/mappedPatchBase.C | 303 ++++++------------ .../mappedPolyPatch/mappedPatchBase.H | 105 +++--- .../mappedPolyPatch/mappedPolyPatch.C | 64 ---- .../mappedPolyPatch/mappedPolyPatch.H | 61 ---- .../mappedPolyPatch/mappedWallPolyPatch.C | 49 +-- .../mappedPolyPatch/mappedWallPolyPatch.H | 48 --- .../nonConformalCyclicPolyPatch.C | 18 -- .../nonConformalCyclicPolyPatch.H | 33 -- .../nonConformalErrorPolyPatch.C | 14 - .../nonConformalErrorPolyPatch.H | 33 -- .../nonConformalProcessorCyclicPolyPatch.C | 15 - .../nonConformalProcessorCyclicPolyPatch.H | 33 -- .../parallel/domainDecompositionDecompose.C | 9 +- .../sampledPatchInternalField.C | 94 ++---- 46 files changed, 171 insertions(+), 1444 deletions(-) diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C index 730f7cec07..49d7c8fbf4 100644 --- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C +++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C @@ -1032,7 +1032,6 @@ labelList addRegionPatches // << " between regions " << e // << " trying to add patches " << names << endl; - mappedWallPolyPatch patch1 ( names[0], @@ -1042,7 +1041,6 @@ labelList addRegionPatches regionNames[e[1]], // sampleRegion mappedPatchBase::NEARESTPATCHFACE, names[1], // samplePatch - point::zero, // offset mesh.boundaryMesh() ); @@ -1064,7 +1062,6 @@ labelList addRegionPatches regionNames[e[0]], // sampleRegion mappedPatchBase::NEARESTPATCHFACE, names[0], - point::zero, // offset mesh.boundaryMesh() ); fvMeshTools::addPatch diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C index a7f1da08eb..35b1e738ed 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C @@ -581,21 +581,6 @@ Foam::coupledPolyPatch::coupledPolyPatch {} -Foam::coupledPolyPatch::coupledPolyPatch -( - const coupledPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart -) -: - polyPatch(pp, bm, index, mapAddressing, newStart), - matchTolerance_(pp.matchTolerance_), - ownToOwnOrderDataPtr_(nullptr) -{} - - // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::coupledPolyPatch::~coupledPolyPatch() diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.H index 7913b98934..81b6a9f3e0 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.H @@ -244,16 +244,6 @@ public: const label newStart ); - //- Construct given the original patch and a map - coupledPolyPatch - ( - const coupledPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ); - //- Destructor virtual ~coupledPolyPatch(); diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.C index a21fa019c9..92ad66d9c4 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -95,21 +95,6 @@ Foam::genericPolyPatch::genericPolyPatch {} -Foam::genericPolyPatch::genericPolyPatch -( - const genericPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart -) -: - polyPatch(pp, bm, index, mapAddressing, newStart), - actualTypeName_(pp.actualTypeName_), - dict_(pp.dict_) -{} - - // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::genericPolyPatch::~genericPolyPatch() diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.H index 18a4164e8f..40c185aefa 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/generic/genericPolyPatch.H @@ -107,16 +107,6 @@ public: const label newStart ); - //- Construct given the original patch and a map - genericPolyPatch - ( - const genericPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ); - //- Construct and return a clone, resetting the boundary mesh virtual autoPtr clone(const polyBoundaryMesh& bm) const { @@ -139,22 +129,6 @@ public: ); } - //- Construct and return a clone, resetting the face list - // and boundary mesh - virtual autoPtr clone - ( - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ) const - { - return autoPtr - ( - new genericPolyPatch(*this, bm, index, mapAddressing, newStart) - ); - } - //- Destructor ~genericPolyPatch(); diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C index 358839fab0..7ace3854d0 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C @@ -281,28 +281,6 @@ Foam::cyclicPolyPatch::cyclicPolyPatch } -Foam::cyclicPolyPatch::cyclicPolyPatch -( - const cyclicPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart -) -: - coupledPolyPatch(pp, bm, index, mapAddressing, newStart), - cyclicTransform(pp), - nbrPatchName_(pp.nbrPatchName_), - coupleGroup_(pp.coupleGroup_), - nbrPatchID_(-1), - coupledPointsPtr_(nullptr), - coupledEdgesPtr_(nullptr), - ownToNbrOrderDataPtr_(nullptr), - ownToNbrCyclicOrderDataPtr_(nullptr), - ownToNbrDebugOrderDataPtr_(nullptr) -{} - - // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::cyclicPolyPatch::~cyclicPolyPatch() diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.H index da46f39be7..1d29871423 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.H @@ -206,16 +206,6 @@ public: const word& nbrPatchName ); - //- Construct given the original patch and a map - cyclicPolyPatch - ( - const cyclicPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ); - //- Construct and return a clone, resetting the boundary mesh virtual autoPtr clone(const polyBoundaryMesh& bm) const { @@ -246,22 +236,6 @@ public: ); } - //- Construct and return a clone, resetting the face list - // and boundary mesh - virtual autoPtr clone - ( - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ) const - { - return autoPtr - ( - new cyclicPolyPatch(*this, bm, index, mapAddressing, newStart) - ); - } - //- Destructor virtual ~cyclicPolyPatch(); diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclicSlip/cyclicSlipPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclicSlip/cyclicSlipPolyPatch.H index a7f6780c24..3bae359568 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclicSlip/cyclicSlipPolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclicSlip/cyclicSlipPolyPatch.H @@ -112,19 +112,6 @@ public: cyclicPolyPatch(pp, bm, index, newSize, newStart, nbrPatchName) {} - //- Construct given the original patch and a map - cyclicSlipPolyPatch - ( - const cyclicPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ) - : - cyclicPolyPatch(pp, bm, index, mapAddressing, newStart) - {} - //- Construct and return a clone, resetting the boundary mesh virtual autoPtr clone(const polyBoundaryMesh& bm) const { @@ -155,29 +142,6 @@ public: ); } - //- Construct and return a clone, resetting the face list - // and boundary mesh - virtual autoPtr clone - ( - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ) const - { - return autoPtr - ( - new cyclicSlipPolyPatch - ( - *this, - bm, - index, - mapAddressing, - newStart - ) - ); - } - //- Destructor virtual ~cyclicSlipPolyPatch() diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/empty/emptyPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/empty/emptyPolyPatch.C index 53af81ba46..ae1513a399 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/empty/emptyPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/empty/emptyPolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -88,17 +88,4 @@ Foam::emptyPolyPatch::emptyPolyPatch {} -Foam::emptyPolyPatch::emptyPolyPatch -( - const emptyPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart -) -: - polyPatch(pp, bm, index, mapAddressing, newStart) -{} - - // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/empty/emptyPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/empty/emptyPolyPatch.H index 091a4a626f..b90afd7e0c 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/empty/emptyPolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/empty/emptyPolyPatch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -93,16 +93,6 @@ public: const label newStart ); - //- Construct given the original patch and a map - emptyPolyPatch - ( - const emptyPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ); - //- Construct and return a clone, resetting the boundary mesh virtual autoPtr clone(const polyBoundaryMesh& bm) const { @@ -124,22 +114,6 @@ public: new emptyPolyPatch(*this, bm, index, newSize, newStart) ); } - - //- Construct and return a clone, resetting the face list - // and boundary mesh - virtual autoPtr clone - ( - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ) const - { - return autoPtr - ( - new emptyPolyPatch(*this, bm, index, mapAddressing, newStart) - ); - } }; diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/internal/internalPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/internal/internalPolyPatch.C index ea92f70d43..3a4919c142 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/internal/internalPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/internal/internalPolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -88,17 +88,4 @@ Foam::internalPolyPatch::internalPolyPatch {} -Foam::internalPolyPatch::internalPolyPatch -( - const internalPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart -) -: - polyPatch(pp, bm, index, mapAddressing, newStart) -{} - - // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/internal/internalPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/internal/internalPolyPatch.H index 936881fa4f..9d95328866 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/internal/internalPolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/internal/internalPolyPatch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -96,16 +96,6 @@ public: const label newStart ); - //- Construct given the original patch and a map - internalPolyPatch - ( - const internalPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ); - //- Construct and return a clone, resetting the boundary mesh virtual autoPtr clone(const polyBoundaryMesh& bm) const { @@ -127,22 +117,6 @@ public: new internalPolyPatch(*this, bm, index, newSize, newStart) ); } - - //- Construct and return a clone, resetting the face list - // and boundary mesh - virtual autoPtr clone - ( - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ) const - { - return autoPtr - ( - new internalPolyPatch(*this, bm, index, mapAddressing, newStart) - ); - } }; diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C index 4e9ba0167d..92840bef8a 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C @@ -146,24 +146,6 @@ Foam::processorPolyPatch::processorPolyPatch {} -Foam::processorPolyPatch::processorPolyPatch -( - const processorPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart -) -: - coupledPolyPatch(pp, bm, index, mapAddressing, newStart), - myProcNo_(pp.myProcNo_), - neighbProcNo_(pp.neighbProcNo_), - neighbFaceCentres_(), - neighbFaceAreas_(), - neighbFaceCellCentres_() -{} - - // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::processorPolyPatch::~processorPolyPatch() diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.H index 1bd4729772..02c526bb57 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.H @@ -162,16 +162,6 @@ public: const label newStart ); - //- Construct given the original patch and a map - processorPolyPatch - ( - const processorPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ); - //- Construct and return a clone, resetting the boundary mesh virtual autoPtr clone(const polyBoundaryMesh& bm) const { @@ -201,29 +191,6 @@ public: ); } - //- Construct and return a clone, resetting the face list - // and boundary mesh - virtual autoPtr clone - ( - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ) const - { - return autoPtr - ( - new processorPolyPatch - ( - *this, - bm, - index, - mapAddressing, - newStart - ) - ); - } - //- Destructor virtual ~processorPolyPatch(); diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C index 520c15067e..9b8caa6a5b 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C @@ -143,22 +143,6 @@ Foam::processorCyclicPolyPatch::processorCyclicPolyPatch {} -Foam::processorCyclicPolyPatch::processorCyclicPolyPatch -( - const processorCyclicPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart -) -: - processorPolyPatch(pp, bm, index, mapAddressing, newStart), - referPatchName_(pp.referPatchName()), - tag_(-1), - referPatchID_(-1) -{} - - // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::processorCyclicPolyPatch::~processorCyclicPolyPatch() diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.H index 2831ac21b2..f1dfe01ee5 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.H @@ -170,16 +170,6 @@ public: const label newStart ); - //- Construct given the original patch and a map - processorCyclicPolyPatch - ( - const processorCyclicPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ); - //- Construct and return a clone, resetting the boundary mesh virtual autoPtr clone(const polyBoundaryMesh& bm) const { @@ -209,29 +199,6 @@ public: ); } - //- Construct and return a clone, resetting the face list - // and boundary mesh - virtual autoPtr clone - ( - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ) const - { - return autoPtr - ( - new processorCyclicPolyPatch - ( - *this, - bm, - index, - mapAddressing, - newStart - ) - ); - } - // Destructor virtual ~processorCyclicPolyPatch(); diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetry/symmetryPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetry/symmetryPolyPatch.C index 7f53298193..9b655da8ab 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetry/symmetryPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetry/symmetryPolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -88,17 +88,4 @@ Foam::symmetryPolyPatch::symmetryPolyPatch {} -Foam::symmetryPolyPatch::symmetryPolyPatch -( - const symmetryPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart -) -: - polyPatch(pp, bm, index, mapAddressing, newStart) -{} - - // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetry/symmetryPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetry/symmetryPolyPatch.H index 0763d9871c..9177cfdfd4 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetry/symmetryPolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetry/symmetryPolyPatch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -96,16 +96,6 @@ public: const label newStart ); - //- Construct given the original patch and a map - symmetryPolyPatch - ( - const symmetryPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ); - //- Construct and return a clone, resetting the boundary mesh virtual autoPtr clone(const polyBoundaryMesh& bm) const { @@ -127,22 +117,6 @@ public: new symmetryPolyPatch(*this, bm, index, newSize, newStart) ); } - - //- Construct and return a clone, resetting the face list - // and boundary mesh - virtual autoPtr clone - ( - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ) const - { - return autoPtr - ( - new symmetryPolyPatch(*this, bm, index, mapAddressing, newStart) - ); - } }; diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetryPlane/symmetryPlanePolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetryPlane/symmetryPlanePolyPatch.C index fe62ddcde6..418e87d376 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetryPlane/symmetryPlanePolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetryPlane/symmetryPlanePolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -136,18 +136,4 @@ Foam::symmetryPlanePolyPatch::symmetryPlanePolyPatch {} -Foam::symmetryPlanePolyPatch::symmetryPlanePolyPatch -( - const symmetryPlanePolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart -) -: - polyPatch(pp, bm, index, mapAddressing, newStart), - n_(pp.n_) -{} - - // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetryPlane/symmetryPlanePolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetryPlane/symmetryPlanePolyPatch.H index 6b1eb9d30c..1c013c4768 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetryPlane/symmetryPlanePolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetryPlane/symmetryPlanePolyPatch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -111,16 +111,6 @@ public: const label newStart ); - //- Construct given the original patch and a map - symmetryPlanePolyPatch - ( - const symmetryPlanePolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ); - //- Construct and return a clone, resetting the boundary mesh virtual autoPtr clone(const polyBoundaryMesh& bm) const { @@ -143,29 +133,6 @@ public: ); } - //- Construct and return a clone, resetting the face list - // and boundary mesh - virtual autoPtr clone - ( - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ) const - { - return autoPtr - ( - new symmetryPlanePolyPatch - ( - *this, - bm, - index, - mapAddressing, - newStart - ) - ); - } - // Member Functions diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.C index 58ae8d5ecc..a61516182c 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -203,23 +203,4 @@ Foam::wedgePolyPatch::wedgePolyPatch {} -Foam::wedgePolyPatch::wedgePolyPatch -( - const wedgePolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart -) -: - polyPatch(pp, bm, index, mapAddressing, newStart), - axis_(pp.axis_), - centreNormal_(pp.centreNormal_), - n_(pp.n_), - cosAngle_(pp.cosAngle_), - faceT_(pp.faceT_), - cellT_(pp.cellT_) -{} - - // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.H index 4a8cb7874d..aa61a9da5a 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -122,16 +122,6 @@ public: const label newStart ); - //- Construct given the original patch and a map - wedgePolyPatch - ( - const wedgePolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ); - //- Construct and return a clone, resetting the boundary mesh virtual autoPtr clone(const polyBoundaryMesh& bm) const { @@ -154,22 +144,6 @@ public: ); } - //- Construct and return a clone, resetting the face list - // and boundary mesh - virtual autoPtr clone - ( - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ) const - { - return autoPtr - ( - new wedgePolyPatch(*this, bm, index, mapAddressing, newStart) - ); - } - // Member Functions diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/derived/wall/wallPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/derived/wall/wallPolyPatch.C index dc40d61aee..869caa8c9d 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/derived/wall/wallPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/derived/wall/wallPolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -100,17 +100,4 @@ Foam::wallPolyPatch::wallPolyPatch {} -Foam::wallPolyPatch::wallPolyPatch -( - const wallPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart -) -: - polyPatch(pp, bm, index, mapAddressing, newStart) -{} - - // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/derived/wall/wallPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/derived/wall/wallPolyPatch.H index 8642a3fe81..6417cac326 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/derived/wall/wallPolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/derived/wall/wallPolyPatch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -93,16 +93,6 @@ public: const label newStart ); - //- Construct given the original patch and a map - wallPolyPatch - ( - const wallPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ); - //- Construct and return a clone, resetting the boundary mesh virtual autoPtr clone(const polyBoundaryMesh& bm) const { @@ -124,22 +114,6 @@ public: new wallPolyPatch(*this, bm, index, newSize, newStart) ); } - - //- Construct and return a clone, resetting the face list - // and boundary mesh - virtual autoPtr clone - ( - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ) const - { - return autoPtr - ( - new wallPolyPatch(*this, bm, index, mapAddressing, newStart) - ); - } }; diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C index 45fef8d4e2..53e9895925 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C @@ -214,33 +214,6 @@ Foam::polyPatch::polyPatch {} -Foam::polyPatch::polyPatch -( - const polyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart -) -: - patchIdentifier(pp, index), - primitivePatch - ( - faceSubList - ( - bm.mesh().faces(), - mapAddressing.size(), - newStart - ), - bm.mesh().points() - ), - start_(newStart), - boundaryMesh_(bm), - faceCellsPtr_(nullptr), - mePtr_(nullptr) -{} - - Foam::polyPatch::polyPatch(const polyPatch& p) : patchIdentifier(p), diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H index 600a532158..c5602f2c9e 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H @@ -209,16 +209,6 @@ public: const label newStart ); - //- Construct given the original patch and a map - polyPatch - ( - const polyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ); - //- Copy constructor polyPatch(const polyPatch&); @@ -244,22 +234,6 @@ public: ); } - //- Construct and return a clone, resetting the face list - // and boundary mesh - virtual autoPtr clone - ( - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ) const - { - return autoPtr - ( - new polyPatch(*this, bm, index, mapAddressing, newStart) - ); - } - // Selectors diff --git a/src/conversion/mergedCyclic/mergedCyclicPolyPatch.C b/src/conversion/mergedCyclic/mergedCyclicPolyPatch.C index 915c485d14..1db2ac42e5 100644 --- a/src/conversion/mergedCyclic/mergedCyclicPolyPatch.C +++ b/src/conversion/mergedCyclic/mergedCyclicPolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2020-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -88,17 +88,4 @@ Foam::mergedCyclicPolyPatch::mergedCyclicPolyPatch {} -Foam::mergedCyclicPolyPatch::mergedCyclicPolyPatch -( - const mergedCyclicPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart -) -: - polyPatch(pp, bm, index, mapAddressing, newStart) -{} - - // ************************************************************************* // diff --git a/src/conversion/mergedCyclic/mergedCyclicPolyPatch.H b/src/conversion/mergedCyclic/mergedCyclicPolyPatch.H index 7956d3610a..3fc8e10fff 100644 --- a/src/conversion/mergedCyclic/mergedCyclicPolyPatch.H +++ b/src/conversion/mergedCyclic/mergedCyclicPolyPatch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2020-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -102,16 +102,6 @@ public: const label newStart ); - //- Construct given the original patch and a map - mergedCyclicPolyPatch - ( - const mergedCyclicPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ); - //- Construct and return a clone, resetting the boundary mesh virtual autoPtr clone(const polyBoundaryMesh& bm) const { @@ -133,29 +123,6 @@ public: new mergedCyclicPolyPatch(*this, bm, index, newSize, newStart) ); } - - //- Construct and return a clone, resetting the face list - // and boundary mesh - virtual autoPtr clone - ( - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ) const - { - return autoPtr - ( - new mergedCyclicPolyPatch - ( - *this, - bm, - index, - mapAddressing, - newStart - ) - ); - } }; diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C index 036121102c..d3e13e796b 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C @@ -374,31 +374,6 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch } -Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch -( - const cyclicAMIPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart -) -: - coupledPolyPatch(pp, bm, index, mapAddressing, newStart), - cyclicTransform(pp), - nbrPatchName_(pp.nbrPatchName_), - coupleGroup_(pp.coupleGroup_), - nbrPatchID_(-1), - AMIs_(), - AMITransforms_(), - AMIReverse_(pp.AMIReverse_), - AMIRequireMatch_(pp.AMIRequireMatch_), - AMILowWeightCorrection_(pp.AMILowWeightCorrection_), - AMIMethod_(pp.AMIMethod_), - surfPtr_(nullptr), - surfDict_(pp.surfDict_) -{} - - // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::cyclicAMIPolyPatch::~cyclicAMIPolyPatch() diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.H b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.H index b458c17497..1167ce5e9f 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.H +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.H @@ -175,17 +175,6 @@ public: const word& nbrPatchName ); - //- Construct given the original patch and a map - cyclicAMIPolyPatch - ( - const cyclicAMIPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ); - - //- Construct and return a clone, resetting the boundary mesh virtual autoPtr clone(const polyBoundaryMesh& bm) const { @@ -216,29 +205,6 @@ public: ); } - //- Construct and return a clone, resetting the face list - // and boundary mesh - virtual autoPtr clone - ( - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ) const - { - return autoPtr - ( - new cyclicAMIPolyPatch - ( - *this, - bm, - index, - mapAddressing, - newStart - ) - ); - } - //- Destructor virtual ~cyclicAMIPolyPatch(); diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedExtrudedWallPolyPatch.C b/src/meshTools/mappedPatches/mappedPolyPatch/mappedExtrudedWallPolyPatch.C index fa7a59f15a..f131c1805e 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedExtrudedWallPolyPatch.C +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedExtrudedWallPolyPatch.C @@ -149,20 +149,6 @@ Foam::mappedExtrudedWallPolyPatch::mappedExtrudedWallPolyPatch {} -Foam::mappedExtrudedWallPolyPatch::mappedExtrudedWallPolyPatch -( - const mappedExtrudedWallPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart -) -: - mappedWallPolyPatch(pp, bm, index, mapAddressing, newStart), - bottomPatch_(pp.bottomPatch_) -{} - - // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::mappedExtrudedWallPolyPatch::~mappedExtrudedWallPolyPatch() diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedExtrudedWallPolyPatch.H b/src/meshTools/mappedPatches/mappedPolyPatch/mappedExtrudedWallPolyPatch.H index ca6ca7c5bb..9a6d9dc7ce 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedExtrudedWallPolyPatch.H +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedExtrudedWallPolyPatch.H @@ -135,16 +135,6 @@ public: const label newStart ); - //- Construct given the original patch and a map - mappedExtrudedWallPolyPatch - ( - const mappedExtrudedWallPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ); - //- Construct and return a clone, resetting the boundary mesh virtual autoPtr clone(const polyBoundaryMesh& bm) const { @@ -177,29 +167,6 @@ public: ); } - //- Construct and return a clone, resetting the face list - // and boundary mesh - virtual autoPtr clone - ( - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ) const - { - return autoPtr - ( - new mappedExtrudedWallPolyPatch - ( - *this, - bm, - index, - mapAddressing, - newStart - ) - ); - } - //- Destructor virtual ~mappedExtrudedWallPolyPatch(); diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C index d4bf3fa417..729b4fb004 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C @@ -65,9 +65,9 @@ namespace Foam 3 >::names[] = { - "uniform", - "nonuniform", - "normal" + "none", + "normal", + "direction" }; } @@ -81,6 +81,41 @@ const Foam::NamedEnum // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +Foam::mappedPatchBase::offsetMode Foam::mappedPatchBase::readOffsetMode +( + const dictionary& dict +) const +{ + if (dict.found("offsetMode")) + { + return offsetModeNames_.read(dict.lookup("offsetMode")); + } + else + { + const bool haveDistance = dict.found("distance"); + const bool haveOffset = dict.found("offset"); + + if (haveDistance && haveOffset) + { + // Error. Demand "offsetMode" setting to disambiguate. + return offsetModeNames_.read(dict.lookup("offsetMode")); + } + else if (haveDistance) + { + return NORMAL; + } + else if (haveOffset) + { + return DIRECTION; + } + else + { + return NONE; + } + } +} + + void Foam::mappedPatchBase::findSamples ( const globalIndex& patchGlobalIndex, @@ -362,7 +397,6 @@ void Foam::mappedPatchBase::calcMapping() const << "Mapping already calculated" << exit(FatalError); } - /* // Do a sanity check. Am I sampling my own patch? This only makes sense if // the position is transformed. if @@ -370,16 +404,15 @@ void Foam::mappedPatchBase::calcMapping() const mode_ == NEARESTPATCHFACE && sampleRegion() == patch_.boundaryMesh().mesh().name() && samplePatch() == patch_.name() - && !transform_.transformsPosition() + && offsetMode_ == NONE ) { FatalErrorInFunction << "Patch " << patch_.name() << " is sampling itself with no " - << "transformation. The patch face values are undefined." + << "offset. The patch face values are undefined." << exit(FatalError); } - */ const globalIndex patchGlobalIndex(patch_.size()); @@ -587,12 +620,11 @@ Foam::mappedPatchBase::mappedPatchBase sampleRegion_(patch_.boundaryMesh().mesh().name()), sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()), mode_(NEARESTPATCHFACE), - samplePatch_(""), + samplePatch_(word::null), coupleGroup_(), - offsetMode_(UNIFORM), - offset_(Zero), - offsets_(pp.size(), offset_), - distance_(0), + offsetMode_(NONE), + distance_(NaN), + offset_(vector::uniform(NaN)), mapPtr_(nullptr), mapIndices_(), AMIPtr_(nullptr), @@ -607,8 +639,7 @@ Foam::mappedPatchBase::mappedPatchBase const polyPatch& pp, const word& sampleRegion, const sampleMode mode, - const word& samplePatch, - const vectorField& offsets + const word& samplePatch ) : patch_(pp), @@ -617,66 +648,9 @@ Foam::mappedPatchBase::mappedPatchBase mode_(mode), samplePatch_(samplePatch), coupleGroup_(), - offsetMode_(NONUNIFORM), - offset_(Zero), - offsets_(offsets), - distance_(0), - mapPtr_(nullptr), - mapIndices_(), - AMIPtr_(nullptr), - AMIReverse_(false), - surfPtr_(nullptr), - surfDict_(fileName("surface")) -{} - - -Foam::mappedPatchBase::mappedPatchBase -( - const polyPatch& pp, - const word& sampleRegion, - const sampleMode mode, - const word& samplePatch, - const vector& offset -) -: - patch_(pp), - sampleRegion_(sampleRegion), - sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()), - mode_(mode), - samplePatch_(samplePatch), - coupleGroup_(), - offsetMode_(UNIFORM), - offset_(offset), - offsets_(0), - distance_(0), - mapPtr_(nullptr), - mapIndices_(), - AMIPtr_(nullptr), - AMIReverse_(false), - surfPtr_(nullptr), - surfDict_(fileName("surface")) -{} - - -Foam::mappedPatchBase::mappedPatchBase -( - const polyPatch& pp, - const word& sampleRegion, - const sampleMode mode, - const word& samplePatch, - const scalar distance -) -: - patch_(pp), - sampleRegion_(sampleRegion), - sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()), - mode_(mode), - samplePatch_(samplePatch), - coupleGroup_(), - offsetMode_(NORMAL), - offset_(Zero), - offsets_(0), - distance_(distance), + offsetMode_(NONE), + distance_(NaN), + offset_(vector::uniform(NaN)), mapPtr_(nullptr), mapIndices_(), AMIPtr_(nullptr), @@ -693,15 +667,24 @@ Foam::mappedPatchBase::mappedPatchBase ) : patch_(pp), - sampleRegion_(dict.lookupOrDefault("sampleRegion", "")), + sampleRegion_(dict.lookupOrDefault("sampleRegion", word::null)), sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()), mode_(sampleModeNames_.read(dict.lookup("sampleMode"))), - samplePatch_(dict.lookupOrDefault("samplePatch", "")), + samplePatch_(dict.lookupOrDefault("samplePatch", word::null)), coupleGroup_(dict), - offsetMode_(UNIFORM), - offset_(Zero), - offsets_(0), - distance_(0.0), + offsetMode_(readOffsetMode(dict)), + distance_ + ( + offsetMode_ == NORMAL + ? dict.lookup("distance") + : NaN + ), + offset_ + ( + offsetMode_ == DIRECTION + ? dict.lookup("offset") + : vector::uniform(NaN) + ), mapPtr_(nullptr), mapIndices_(), AMIPtr_(nullptr), @@ -709,57 +692,11 @@ Foam::mappedPatchBase::mappedPatchBase surfPtr_(nullptr), surfDict_(dict.subOrEmptyDict("surface")) { - if (!coupleGroup_.valid()) + if (!coupleGroup_.valid() && sampleRegion_.empty()) { - if (sampleRegion_.empty()) - { - // If no coupleGroup and no sampleRegion assume local region - sampleRegion_ = patch_.boundaryMesh().mesh().name(); - sameRegion_ = true; - } - } - - if (dict.found("offsetMode")) - { - offsetMode_ = offsetModeNames_.read(dict.lookup("offsetMode")); - - switch(offsetMode_) - { - case UNIFORM: - { - offset_ = point(dict.lookup("offset")); - } - break; - - case NONUNIFORM: - { - offsets_ = readListOrField("offsets", dict, patch_.size()); - } - break; - - case NORMAL: - { - distance_ = dict.lookup("distance"); - } - break; - } - } - else if (dict.found("offset")) - { - offsetMode_ = UNIFORM; - offset_ = point(dict.lookup("offset")); - } - else if (dict.found("offsets")) - { - offsetMode_ = NONUNIFORM; - offsets_ = readListOrField("offsets", dict, patch_.size()); - } - else if (mode_ != NEARESTPATCHFACE && mode_ != NEARESTPATCHFACEAMI) - { - FatalIOErrorInFunction(dict) - << "Please supply the offsetMode as one of " - << NamedEnum::words() - << exit(FatalIOError); + // If no coupleGroup and no sampleRegion then assume the local region + sampleRegion_ = patch_.boundaryMesh().mesh().name(); + sameRegion_ = true; } } @@ -777,40 +714,8 @@ Foam::mappedPatchBase::mappedPatchBase samplePatch_(mpb.samplePatch_), coupleGroup_(mpb.coupleGroup_), offsetMode_(mpb.offsetMode_), - offset_(mpb.offset_), - offsets_(mpb.offsets_), distance_(mpb.distance_), - mapPtr_(nullptr), - mapIndices_(), - AMIPtr_(nullptr), - AMIReverse_(mpb.AMIReverse_), - surfPtr_(nullptr), - surfDict_(mpb.surfDict_) -{} - - -Foam::mappedPatchBase::mappedPatchBase -( - const polyPatch& pp, - const mappedPatchBase& mpb, - const labelUList& mapAddressing -) -: - patch_(pp), - sampleRegion_(mpb.sampleRegion_), - sameRegion_(mpb.sameRegion_), - mode_(mpb.mode_), - samplePatch_(mpb.samplePatch_), - coupleGroup_(mpb.coupleGroup_), - offsetMode_(mpb.offsetMode_), offset_(mpb.offset_), - offsets_ - ( - offsetMode_ == NONUNIFORM - ? vectorField(mpb.offsets_, mapAddressing) - : vectorField(0) - ), - distance_(mpb.distance_), mapPtr_(nullptr), mapIndices_(), AMIPtr_(nullptr), @@ -918,21 +823,14 @@ Foam::tmp Foam::mappedPatchBase::samplePoints() const // Apply offset to get sample points switch (offsetMode_) { - case UNIFORM: - { - result += offset_; + case NONE: break; - } - case NONUNIFORM: - { - result += offsets_; - break; - } case NORMAL: - { result += distance_*patch_.faceNormals(); break; - } + case DIRECTION: + result += offset_; + break; } return tresult; @@ -961,50 +859,31 @@ void Foam::mappedPatchBase::write(Ostream& os) const } coupleGroup_.write(os); - if - ( - offsetMode_ == UNIFORM - && offset_ == vector::zero - && (mode_ == NEARESTPATCHFACE || mode_ == NEARESTPATCHFACEAMI) - ) - { - // Collocated mode. No need to write offset data - } - else - { - writeEntry(os, "offsetMode", offsetModeNames_[offsetMode_]); + writeEntry(os, "offsetMode", offsetModeNames_[offsetMode_]); - switch (offsetMode_) + switch (offsetMode_) + { + case NONE: + break; + case NORMAL: + writeEntry(os, "distance", distance_); + break; + case DIRECTION: + writeEntry(os, "offset", offset_); + break; + } + + if (mode_ == NEARESTPATCHFACEAMI) + { + if (AMIReverse_) { - case UNIFORM: - { - writeEntry(os, "offset", offset_); - break; - } - case NONUNIFORM: - { - writeEntry(os, "offsets", offsets_); - break; - } - case NORMAL: - { - writeEntry(os, "distance", distance_); - break; - } + writeEntry(os, "flipNormals", AMIReverse_); } - if (mode_ == NEARESTPATCHFACEAMI) + if (!surfDict_.empty()) { - if (AMIReverse_) - { - writeEntry(os, "flipNormals", AMIReverse_); - } - - if (!surfDict_.empty()) - { - writeKeyword(os, surfDict_.dictName()); - os << surfDict_; - } + writeKeyword(os, surfDict_.dictName()); + os << surfDict_; } } } diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.H b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.H index 65bcb1d46d..2e5146464a 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.H +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.H @@ -28,42 +28,44 @@ Description Determines a mapping between patch face centres and mesh cell or face centres and processors they're on. - If constructed from dictionary: + Example: \verbatim - // Region to sample (default is region0) - sampleRegion region0; - - // What to sample: - // - nearestCell : sample cell containing point - // - nearestOnlyCell : nearest sample cell (even if not containing - // point) + // What to sample + // - nearestCell : cell containing the sampling point // - nearestPatchFace : nearest face on selected patch - // - nearestPatchFaceAMI : nearest face on selected patch - - patches need not conform - - uses AMI interpolation + // - nearestPatchFaceAMI : AMI interpolation from selected patch // - nearestFace : nearest boundary face on any patch sampleMode nearestCell; - // If sampleMode is nearestPatchFace : patch to find faces of + // Region to sample from + sampleRegion region0; + + // If sampleMode is nearestPatchFace* : The patch to sample from samplePatch movingWall; - // If sampleMode is nearestPatchFace : specify patchgroup to find - // samplePatch and sampleRegion (if not provided) + // If sampleMode is nearestPatchFace* : Couple group to specify the + // sample region and patch + // (alternative to specifying + // sampleRegion and samplePatch + // directly) coupleGroup baffleGroup; - // How to supply offset (w.r.t. my patch face centres): - // - uniform : single offset vector - // - nonuniform : per-face offset vector - // - normal : using supplied distance and face normal - offsetMode uniform; + // How to offset the patch face centres to the sampling locations + // - none : no offset + // - normal : distance along the patch face normals + // - direction : specified offset vector + offsetMode direction; - // According to offsetMode (see above) supply one of - // offset, offsets or distance - offset (1 0 0); + // If offsetMode is normal : The normal distance to offset + distance 1; + + // If offsetMode is direction : The offset vector + offset (1 0 0); \endverbatim - Note: if offsetMode is \c normal it uses outwards pointing normals. So - supply a negative distance if sampling inside the domain. + Note that patch normals point outward, so if offsetMode is \c normal then a + negative distance will be required in order to sample value from inside the + domain. SourceFiles mappedPatchBase.C @@ -109,9 +111,9 @@ public: //- How to project face centres enum offsetMode { - UNIFORM, // single offset vector - NONUNIFORM, // per-face offset vector - NORMAL // use face normal + distance + NONE, // do not offset + NORMAL, // offset a distance in the face-normal direction + DIRECTION // offset with a specified vector }; static const NamedEnum sampleModeNames_; @@ -141,18 +143,15 @@ protected: //- PatchGroup (if in sampleMode NEARESTPATCH*) const coupleGroupIdentifier coupleGroup_; - //- How to obtain samples + //- How to offset the patch face centres to the sampling locations offsetMode offsetMode_; - //- Offset vector (uniform) - vector offset_; - - //- Offset vector (nonuniform) - vectorField offsets_; - - //- Offset distance (normal) + //- Offset distance scalar distance_; + //- Offset vector + vector offset_; + // Derived information @@ -180,6 +179,9 @@ protected: // Protected Member Functions + //- Read the offset mode from a dictionary + offsetMode readOffsetMode(const dictionary& dict) const; + //- Find cells/faces containing samples void findSamples ( @@ -217,34 +219,13 @@ public: //- Construct from patch mappedPatchBase(const polyPatch&); - //- Construct with offsetMode=non-uniform + //- Construct with no offset mappedPatchBase ( const polyPatch& pp, const word& sampleRegion, const sampleMode sampleMode, - const word& samplePatch, - const vectorField& offsets - ); - - //- Construct from offsetMode=uniform - mappedPatchBase - ( - const polyPatch& pp, - const word& sampleRegion, - const sampleMode sampleMode, - const word& samplePatch, - const vector& offset - ); - - //- Construct from offsetMode=normal and distance - mappedPatchBase - ( - const polyPatch& pp, - const word& sampleRegion, - const sampleMode sampleMode, - const word& samplePatch, - const scalar distance + const word& samplePatch ); //- Construct from dictionary @@ -253,14 +234,6 @@ public: //- Construct as copy, resetting patch mappedPatchBase(const polyPatch&, const mappedPatchBase&); - //- Construct as copy, resetting patch, map original data - mappedPatchBase - ( - const polyPatch&, - const mappedPatchBase&, - const labelUList& mapAddressing - ); - //- Destructor virtual ~mappedPatchBase(); diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPolyPatch.C b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPolyPatch.C index 7974739793..a3cb2c2f5f 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPolyPatch.C +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPolyPatch.C @@ -60,56 +60,6 @@ Foam::mappedPolyPatch::mappedPolyPatch } -Foam::mappedPolyPatch::mappedPolyPatch -( - const word& name, - const label size, - const label start, - const label index, - const word& sampleRegion, - const mappedPatchBase::sampleMode mode, - const word& samplePatch, - const vectorField& offset, - const polyBoundaryMesh& bm -) -: - polyPatch(name, size, start, index, bm, typeName), - mappedPatchBase - ( - static_cast(*this), - sampleRegion, - mode, - samplePatch, - offset - ) -{} - - -Foam::mappedPolyPatch::mappedPolyPatch -( - const word& name, - const label size, - const label start, - const label index, - const word& sampleRegion, - const mappedPatchBase::sampleMode mode, - const word& samplePatch, - const vector& offset, - const polyBoundaryMesh& bm -) -: - polyPatch(name, size, start, index, bm, typeName), - mappedPatchBase - ( - static_cast(*this), - sampleRegion, - mode, - samplePatch, - offset - ) -{} - - Foam::mappedPolyPatch::mappedPolyPatch ( const word& name, @@ -155,20 +105,6 @@ Foam::mappedPolyPatch::mappedPolyPatch {} -Foam::mappedPolyPatch::mappedPolyPatch -( - const mappedPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart -) -: - polyPatch(pp, bm, index, mapAddressing, newStart), - mappedPatchBase(*this, pp, mapAddressing) -{} - - // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::mappedPolyPatch::~mappedPolyPatch() diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPolyPatch.H b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPolyPatch.H index 9788a3a8a6..69f179b444 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPolyPatch.H +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPolyPatch.H @@ -97,34 +97,6 @@ public: const word& patchType ); - //- Construct from components - mappedPolyPatch - ( - const word& name, - const label size, - const label start, - const label index, - const word& sampleRegion, - const mappedPatchBase::sampleMode mode, - const word& samplePatch, - const vectorField& offset, - const polyBoundaryMesh& bm - ); - - //- Construct from components. Uniform offset. - mappedPolyPatch - ( - const word& name, - const label size, - const label start, - const label index, - const word& sampleRegion, - const mappedPatchBase::sampleMode mode, - const word& samplePatch, - const vector& offset, - const polyBoundaryMesh& bm - ); - //- Construct from dictionary mappedPolyPatch ( @@ -153,16 +125,6 @@ public: const label newStart ); - //- Construct given the original patch and a map - mappedPolyPatch - ( - const mappedPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ); - //- Construct and return a clone, resetting the boundary mesh virtual autoPtr clone(const polyBoundaryMesh& bm) const { @@ -185,29 +147,6 @@ public: ); } - //- Construct and return a clone, resetting the face list - // and boundary mesh - virtual autoPtr clone - ( - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ) const - { - return autoPtr - ( - new mappedPolyPatch - ( - *this, - bm, - index, - mapAddressing, - newStart - ) - ); - } - //- Destructor virtual ~mappedPolyPatch(); diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedWallPolyPatch.C b/src/meshTools/mappedPatches/mappedPolyPatch/mappedWallPolyPatch.C index 6780929ab9..cce225c1be 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedWallPolyPatch.C +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedWallPolyPatch.C @@ -75,44 +75,11 @@ Foam::mappedWallPolyPatch::mappedWallPolyPatch const word& sampleRegion, const mappedPatchBase::sampleMode mode, const word& samplePatch, - const vectorField& offset, const polyBoundaryMesh& bm ) : wallPolyPatch(name, size, start, index, bm, typeName), - mappedPatchBase - ( - static_cast(*this), - sampleRegion, - mode, - samplePatch, - offset - ) -{} - - -Foam::mappedWallPolyPatch::mappedWallPolyPatch -( - const word& name, - const label size, - const label start, - const label index, - const word& sampleRegion, - const mappedPatchBase::sampleMode mode, - const word& samplePatch, - const vector& offset, - const polyBoundaryMesh& bm -) -: - wallPolyPatch(name, size, start, index, bm, typeName), - mappedPatchBase - ( - static_cast(*this), - sampleRegion, - mode, - samplePatch, - offset - ) + mappedPatchBase(*this, sampleRegion, mode, samplePatch) {} @@ -161,20 +128,6 @@ Foam::mappedWallPolyPatch::mappedWallPolyPatch {} -Foam::mappedWallPolyPatch::mappedWallPolyPatch -( - const mappedWallPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart -) -: - wallPolyPatch(pp, bm, index, mapAddressing, newStart), - mappedPatchBase(*this, pp, mapAddressing) -{} - - // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::mappedWallPolyPatch::~mappedWallPolyPatch() diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedWallPolyPatch.H b/src/meshTools/mappedPatches/mappedPolyPatch/mappedWallPolyPatch.H index 595420623b..3aff65e9e9 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedWallPolyPatch.H +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedWallPolyPatch.H @@ -107,21 +107,6 @@ public: const word& sampleRegion, const mappedPatchBase::sampleMode mode, const word& samplePatch, - const vectorField& offset, - const polyBoundaryMesh& bm - ); - - //- Construct from components. Uniform offset. - mappedWallPolyPatch - ( - const word& name, - const label size, - const label start, - const label index, - const word& sampleRegion, - const mappedPatchBase::sampleMode mode, - const word& samplePatch, - const vector& offset, const polyBoundaryMesh& bm ); @@ -153,16 +138,6 @@ public: const label newStart ); - //- Construct given the original patch and a map - mappedWallPolyPatch - ( - const mappedWallPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ); - //- Construct and return a clone, resetting the boundary mesh virtual autoPtr clone(const polyBoundaryMesh& bm) const { @@ -192,29 +167,6 @@ public: ); } - //- Construct and return a clone, resetting the face list - // and boundary mesh - virtual autoPtr clone - ( - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ) const - { - return autoPtr - ( - new mappedWallPolyPatch - ( - *this, - bm, - index, - mapAddressing, - newStart - ) - ); - } - //- Destructor virtual ~mappedWallPolyPatch(); diff --git a/src/meshTools/nonConformal/polyPatches/nonConformalCyclic/nonConformalCyclicPolyPatch.C b/src/meshTools/nonConformal/polyPatches/nonConformalCyclic/nonConformalCyclicPolyPatch.C index cb89c1d737..f1a110cbab 100644 --- a/src/meshTools/nonConformal/polyPatches/nonConformalCyclic/nonConformalCyclicPolyPatch.C +++ b/src/meshTools/nonConformal/polyPatches/nonConformalCyclic/nonConformalCyclicPolyPatch.C @@ -220,24 +220,6 @@ Foam::nonConformalCyclicPolyPatch::nonConformalCyclicPolyPatch {} -Foam::nonConformalCyclicPolyPatch::nonConformalCyclicPolyPatch -( - const nonConformalCyclicPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart -) -: - cyclicPolyPatch(pp, bm, index, mapAddressing, newStart), - nonConformalCoupledPolyPatch(*this, pp), - intersectionIsValid_(false), - intersection_(false), - raysIsValid_(false), - rays_(false) -{} - - // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::nonConformalCyclicPolyPatch::~nonConformalCyclicPolyPatch() diff --git a/src/meshTools/nonConformal/polyPatches/nonConformalCyclic/nonConformalCyclicPolyPatch.H b/src/meshTools/nonConformal/polyPatches/nonConformalCyclic/nonConformalCyclicPolyPatch.H index 2a5e7e92c0..bd160dd7f6 100644 --- a/src/meshTools/nonConformal/polyPatches/nonConformalCyclic/nonConformalCyclicPolyPatch.H +++ b/src/meshTools/nonConformal/polyPatches/nonConformalCyclic/nonConformalCyclicPolyPatch.H @@ -162,16 +162,6 @@ public: const word& origPatchName ); - //- Construct given the original patch and a map - nonConformalCyclicPolyPatch - ( - const nonConformalCyclicPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ); - //- Construct and return a clone, resetting the boundary mesh virtual autoPtr clone(const polyBoundaryMesh& bm) const { @@ -206,29 +196,6 @@ public: ); } - //- Construct and return a clone, resetting the face list - // and boundary mesh - virtual autoPtr clone - ( - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ) const - { - return autoPtr - ( - new nonConformalCyclicPolyPatch - ( - *this, - bm, - index, - mapAddressing, - newStart - ) - ); - } - //- Destructor virtual ~nonConformalCyclicPolyPatch(); diff --git a/src/meshTools/nonConformal/polyPatches/nonConformalError/nonConformalErrorPolyPatch.C b/src/meshTools/nonConformal/polyPatches/nonConformalError/nonConformalErrorPolyPatch.C index f92d19ad8d..e98cd8cbf4 100644 --- a/src/meshTools/nonConformal/polyPatches/nonConformalError/nonConformalErrorPolyPatch.C +++ b/src/meshTools/nonConformal/polyPatches/nonConformalError/nonConformalErrorPolyPatch.C @@ -132,20 +132,6 @@ Foam::nonConformalErrorPolyPatch::nonConformalErrorPolyPatch {} -Foam::nonConformalErrorPolyPatch::nonConformalErrorPolyPatch -( - const nonConformalErrorPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart -) -: - polyPatch(pp, bm, index, mapAddressing, newStart), - nonConformalPolyPatch(*this, pp) -{} - - // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::nonConformalErrorPolyPatch::~nonConformalErrorPolyPatch() diff --git a/src/meshTools/nonConformal/polyPatches/nonConformalError/nonConformalErrorPolyPatch.H b/src/meshTools/nonConformal/polyPatches/nonConformalError/nonConformalErrorPolyPatch.H index e7cc9e3bec..70ee809f99 100644 --- a/src/meshTools/nonConformal/polyPatches/nonConformalError/nonConformalErrorPolyPatch.H +++ b/src/meshTools/nonConformal/polyPatches/nonConformalError/nonConformalErrorPolyPatch.H @@ -132,16 +132,6 @@ public: const word& origPatchName ); - //- Construct given the original patch and a map - nonConformalErrorPolyPatch - ( - const nonConformalErrorPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ); - //- Construct and return a clone, resetting the boundary mesh virtual autoPtr clone(const polyBoundaryMesh& bm) const { @@ -175,29 +165,6 @@ public: ); } - //- Construct and return a clone, resetting the face list - // and boundary mesh - virtual autoPtr clone - ( - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ) const - { - return autoPtr - ( - new nonConformalErrorPolyPatch - ( - *this, - bm, - index, - mapAddressing, - newStart - ) - ); - } - //- Destructor virtual ~nonConformalErrorPolyPatch(); diff --git a/src/meshTools/nonConformal/polyPatches/nonConformalProcessorCyclic/nonConformalProcessorCyclicPolyPatch.C b/src/meshTools/nonConformal/polyPatches/nonConformalProcessorCyclic/nonConformalProcessorCyclicPolyPatch.C index 47b9d03f9a..d7ea3b81b1 100644 --- a/src/meshTools/nonConformal/polyPatches/nonConformalProcessorCyclic/nonConformalProcessorCyclicPolyPatch.C +++ b/src/meshTools/nonConformal/polyPatches/nonConformalProcessorCyclic/nonConformalProcessorCyclicPolyPatch.C @@ -135,21 +135,6 @@ nonConformalProcessorCyclicPolyPatch {} -Foam::nonConformalProcessorCyclicPolyPatch:: -nonConformalProcessorCyclicPolyPatch -( - const nonConformalProcessorCyclicPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart -) -: - processorCyclicPolyPatch(pp, bm, index, mapAddressing, newStart), - nonConformalCoupledPolyPatch(*this, pp) -{} - - // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::nonConformalProcessorCyclicPolyPatch:: diff --git a/src/meshTools/nonConformal/polyPatches/nonConformalProcessorCyclic/nonConformalProcessorCyclicPolyPatch.H b/src/meshTools/nonConformal/polyPatches/nonConformalProcessorCyclic/nonConformalProcessorCyclicPolyPatch.H index a7ad79cbb6..f5d46efbc5 100644 --- a/src/meshTools/nonConformal/polyPatches/nonConformalProcessorCyclic/nonConformalProcessorCyclicPolyPatch.H +++ b/src/meshTools/nonConformal/polyPatches/nonConformalProcessorCyclic/nonConformalProcessorCyclicPolyPatch.H @@ -117,16 +117,6 @@ public: const label newStart ); - //- Construct given the original patch and a map - nonConformalProcessorCyclicPolyPatch - ( - const nonConformalProcessorCyclicPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ); - //- Construct and return a clone, resetting the boundary mesh virtual autoPtr clone(const polyBoundaryMesh& bm) const { @@ -159,29 +149,6 @@ public: ); } - //- Construct and return a clone, resetting the face list - // and boundary mesh - virtual autoPtr clone - ( - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ) const - { - return autoPtr - ( - new nonConformalProcessorCyclicPolyPatch - ( - *this, - bm, - index, - mapAddressing, - newStart - ) - ); - } - // Destructor virtual ~nonConformalProcessorCyclicPolyPatch(); diff --git a/src/parallel/parallel/domainDecompositionDecompose.C b/src/parallel/parallel/domainDecompositionDecompose.C index d56cf8f078..22509493b0 100644 --- a/src/parallel/parallel/domainDecompositionDecompose.C +++ b/src/parallel/parallel/domainDecompositionDecompose.C @@ -806,7 +806,7 @@ void Foam::domainDecomposition::decompose() label nPatches = 0; - // Map existing non-proc patches + // Copy existing non-proc patches forAll(curPatchSizes, patchi) { const polyPatch& meshPatch = meshPatches[patchi]; @@ -816,12 +816,7 @@ void Foam::domainDecomposition::decompose() ( procMesh.boundaryMesh(), nPatches, - SubList