From 472451a0ca26d740b50b32fc8775df04642866ee Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Tue, 9 May 2023 11:57:02 +0100 Subject: [PATCH] mappedWall: Permit transformation This change relaxes the previous restriction that mappedWall patches cannot have transformation. It permits cyclic multi-region simulations in which the cyclic plane lies on the interface between regions. The mappedWall still differs from the mapped patch in that it is assumed to be untransformed unless a transformation is explicitly specified. The mapped patch, by contrast, will attempt to automatically calculate a transformation from the geometry of the patches in the same way as is done for cyclics. --- .../mappedExtrudedPatchBase/mappedExtrudedPatchBase.C | 4 ++-- .../mappedExtrudedPatchBase/mappedExtrudedPatchBase.H | 2 +- .../mappedPatches/mappedPatchBase/mappedPatchBase.C | 9 ++------- .../mappedPatches/mappedPatchBase/mappedPatchBase.H | 2 +- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/meshTools/mappedPatches/mappedExtrudedPatchBase/mappedExtrudedPatchBase.C b/src/meshTools/mappedPatches/mappedExtrudedPatchBase/mappedExtrudedPatchBase.C index 31ecc2386b..2803af51cd 100644 --- a/src/meshTools/mappedPatches/mappedExtrudedPatchBase/mappedExtrudedPatchBase.C +++ b/src/meshTools/mappedPatches/mappedExtrudedPatchBase/mappedExtrudedPatchBase.C @@ -369,10 +369,10 @@ Foam::mappedExtrudedPatchBase::mappedExtrudedPatchBase ( const polyPatch& pp, const dictionary& dict, - const bool transformIsNone + const bool defaultTransformIsNone ) : - mappedPatchBase(pp, dict, transformIsNone), + mappedPatchBase(pp, dict, defaultTransformIsNone), isExtrudedRegion_(dict.lookup("isExtrudedRegion")) {} diff --git a/src/meshTools/mappedPatches/mappedExtrudedPatchBase/mappedExtrudedPatchBase.H b/src/meshTools/mappedPatches/mappedExtrudedPatchBase/mappedExtrudedPatchBase.H index 7e8fb7d213..0b06fbff6e 100644 --- a/src/meshTools/mappedPatches/mappedExtrudedPatchBase/mappedExtrudedPatchBase.H +++ b/src/meshTools/mappedPatches/mappedExtrudedPatchBase/mappedExtrudedPatchBase.H @@ -106,7 +106,7 @@ public: ( const polyPatch& pp, const dictionary& dict, - const bool transformisNone + const bool defaultTransformIsNone ); //- Construct as copy, resetting the boundary mesh diff --git a/src/meshTools/mappedPatches/mappedPatchBase/mappedPatchBase.C b/src/meshTools/mappedPatches/mappedPatchBase/mappedPatchBase.C index 6ef20a9432..caa9f18782 100644 --- a/src/meshTools/mappedPatches/mappedPatchBase/mappedPatchBase.C +++ b/src/meshTools/mappedPatches/mappedPatchBase/mappedPatchBase.C @@ -366,7 +366,7 @@ Foam::mappedPatchBase::mappedPatchBase ( const polyPatch& pp, const dictionary& dict, - const bool transformIsNone + const bool defaultTransformIsNone ) : patch_(pp), @@ -386,12 +386,7 @@ Foam::mappedPatchBase::mappedPatchBase : dict.lookupOrDefault("samePatch", false) ? pp.name() : dict.lookupBackwardsCompatible({"neighbourPatch", "samplePatch"}) ), - transform_ - ( - transformIsNone - ? cyclicTransform(true) - : cyclicTransform(dict, false) - ), + transform_(cyclicTransform(dict, defaultTransformIsNone)), usingTree_(!dict.found("method") && !dict.found("sampleMode")), treeMapPtr_(nullptr), treeNbrPatchFaceIndices_(), diff --git a/src/meshTools/mappedPatches/mappedPatchBase/mappedPatchBase.H b/src/meshTools/mappedPatches/mappedPatchBase/mappedPatchBase.H index f4f73012f9..9e1160c7d3 100644 --- a/src/meshTools/mappedPatches/mappedPatchBase/mappedPatchBase.H +++ b/src/meshTools/mappedPatches/mappedPatchBase/mappedPatchBase.H @@ -183,7 +183,7 @@ public: ( const polyPatch& pp, const dictionary& dict, - const bool transformisNone + const bool defaultTransformIsNone ); //- Construct as copy, resetting patch