Skip to content

Commit

Permalink
NCC: Fix parallelisation bugs when used with meshToMesh mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Bainbridge committed Aug 23, 2022
1 parent 38cc003 commit 9199725
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ bool Foam::fvMeshTopoChangers::meshToMesh::update()

mesh().reset(newMesh);

mesh().deltaCoeffs();

// Map all the volFields in the objectRegistry
#define mapVolFieldType(Type, nullArg) \
MeshToMeshMapVolFields<Type>(mapper);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,12 @@ Foam::nonConformalPolyPatch::nonConformalPolyPatch

Foam::nonConformalPolyPatch::nonConformalPolyPatch
(
const nonConformalPolyPatch& patch
const polyPatch& patch,
const nonConformalPolyPatch& ncPatch
)
:
patch_(patch.patch_),
origPatchName_(patch.origPatchName_),
patch_(patch),
origPatchName_(ncPatch.origPatchName_),
origPatchID_(-1)
{
validateSize();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,18 @@ public:
);

//- Construct from a patch and a dictionary
nonConformalPolyPatch(const polyPatch& patch, const dictionary& dict);
nonConformalPolyPatch
(
const polyPatch& patch,
const dictionary& dict
);

//- Construct from a non-conformal patch
nonConformalPolyPatch(const nonConformalPolyPatch& patch);
//- Construct from a patch and a non-conformal patch
nonConformalPolyPatch
(
const polyPatch& patch,
const nonConformalPolyPatch& ncPatch
);


//- Destructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,11 @@ Foam::nonConformalCoupledPolyPatch::nonConformalCoupledPolyPatch

Foam::nonConformalCoupledPolyPatch::nonConformalCoupledPolyPatch
(
const nonConformalCoupledPolyPatch& patch
const polyPatch& patch,
const nonConformalCoupledPolyPatch& nccPatch
)
:
nonConformalPolyPatch(patch),
nonConformalPolyPatch(patch, nccPatch),
patch_(refCast<const coupledPolyPatch>(patch)),
errorPatchName_(word::null),
errorPatchID_(-1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,12 @@ public:
const dictionary& dict
);

//- Construct from a non-conformal coupled patch
nonConformalCoupledPolyPatch(const nonConformalCoupledPolyPatch& patch);
//- Construct from a patch and a non-conformal coupled patch
nonConformalCoupledPolyPatch
(
const polyPatch& patch,
const nonConformalCoupledPolyPatch& nccPatch
);


//- Destructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,7 @@ Foam::nonConformalCyclicPolyPatch::nonConformalCyclicPolyPatch
nbrPatchName,
transform
),
nonConformalCoupledPolyPatch
(
static_cast<const polyPatch&>(*this),
origPatchName
),
nonConformalCoupledPolyPatch(*this, origPatchName),
intersectionIsValid_(false),
intersection_(false),
raysIsValid_(false),
Expand All @@ -181,7 +177,7 @@ Foam::nonConformalCyclicPolyPatch::nonConformalCyclicPolyPatch
)
:
cyclicPolyPatch(name, dict, index, bm, patchType, true),
nonConformalCoupledPolyPatch(static_cast<const polyPatch&>(*this), dict),
nonConformalCoupledPolyPatch(*this, dict),
intersectionIsValid_(false),
intersection_(false),
raysIsValid_(false),
Expand All @@ -196,10 +192,7 @@ Foam::nonConformalCyclicPolyPatch::nonConformalCyclicPolyPatch
)
:
cyclicPolyPatch(pp, bm),
nonConformalCoupledPolyPatch
(
static_cast<const nonConformalCoupledPolyPatch&>(pp)
),
nonConformalCoupledPolyPatch(*this, pp),
intersectionIsValid_(false),
intersection_(false),
raysIsValid_(false),
Expand All @@ -219,11 +212,7 @@ Foam::nonConformalCyclicPolyPatch::nonConformalCyclicPolyPatch
)
:
cyclicPolyPatch(pp, bm, index, newSize, newStart, nbrPatchName),
nonConformalCoupledPolyPatch
(
static_cast<const polyPatch&>(*this),
origPatchName
),
nonConformalCoupledPolyPatch(*this, origPatchName),
intersectionIsValid_(false),
intersection_(false),
raysIsValid_(false),
Expand All @@ -241,10 +230,7 @@ Foam::nonConformalCyclicPolyPatch::nonConformalCyclicPolyPatch
)
:
cyclicPolyPatch(pp, bm, index, mapAddressing, newStart),
nonConformalCoupledPolyPatch
(
static_cast<const nonConformalCoupledPolyPatch&>(pp)
),
nonConformalCoupledPolyPatch(*this, pp),
intersectionIsValid_(false),
intersection_(false),
raysIsValid_(false),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Foam::nonConformalErrorPolyPatch::nonConformalErrorPolyPatch
)
:
polyPatch(name, size, start, index, bm, patchType),
nonConformalPolyPatch(static_cast<const polyPatch&>(*this), origPatchName)
nonConformalPolyPatch(*this, origPatchName)
{}


Expand All @@ -102,7 +102,7 @@ Foam::nonConformalErrorPolyPatch::nonConformalErrorPolyPatch
)
:
polyPatch(name, dict, index, bm, patchType),
nonConformalPolyPatch(static_cast<const polyPatch&>(*this), dict)
nonConformalPolyPatch(*this, dict)
{}


Expand All @@ -113,7 +113,7 @@ Foam::nonConformalErrorPolyPatch::nonConformalErrorPolyPatch
)
:
polyPatch(pp, bm),
nonConformalPolyPatch(static_cast<const nonConformalPolyPatch&>(pp))
nonConformalPolyPatch(*this, pp)
{}


Expand All @@ -128,7 +128,7 @@ Foam::nonConformalErrorPolyPatch::nonConformalErrorPolyPatch
)
:
polyPatch(pp, bm, index, newSize, newStart),
nonConformalPolyPatch(static_cast<const polyPatch&>(pp), origPatchName)
nonConformalPolyPatch(*this, origPatchName)
{}


Expand All @@ -142,7 +142,7 @@ Foam::nonConformalErrorPolyPatch::nonConformalErrorPolyPatch
)
:
polyPatch(pp, bm, index, mapAddressing, newStart),
nonConformalPolyPatch(static_cast<const nonConformalPolyPatch&>(pp))
nonConformalPolyPatch(*this, pp)
{}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,7 @@ nonConformalProcessorCyclicPolyPatch
referPatchName,
patchType
),
nonConformalCoupledPolyPatch
(
static_cast<const polyPatch&>(*this),
origPatchName
)
nonConformalCoupledPolyPatch(*this, origPatchName)
{}


Expand All @@ -108,7 +104,7 @@ nonConformalProcessorCyclicPolyPatch
)
:
processorCyclicPolyPatch(name, dict, index, bm, patchType),
nonConformalCoupledPolyPatch(static_cast<const polyPatch&>(*this), dict)
nonConformalCoupledPolyPatch(*this, dict)
{}


Expand All @@ -120,10 +116,7 @@ nonConformalProcessorCyclicPolyPatch
)
:
processorCyclicPolyPatch(pp, bm),
nonConformalCoupledPolyPatch
(
static_cast<const nonConformalCoupledPolyPatch&>(pp)
)
nonConformalCoupledPolyPatch(*this, pp)
{}


Expand All @@ -138,10 +131,7 @@ nonConformalProcessorCyclicPolyPatch
)
:
processorCyclicPolyPatch(pp, bm, index, newSize, newStart),
nonConformalCoupledPolyPatch
(
static_cast<const nonConformalCoupledPolyPatch&>(pp)
)
nonConformalCoupledPolyPatch(*this, pp)
{}


Expand All @@ -156,10 +146,7 @@ nonConformalProcessorCyclicPolyPatch
)
:
processorCyclicPolyPatch(pp, bm, index, mapAddressing, newStart),
nonConformalCoupledPolyPatch
(
static_cast<const nonConformalCoupledPolyPatch&>(pp)
)
nonConformalCoupledPolyPatch(*this, pp)
{}


Expand Down

0 comments on commit 9199725

Please sign in to comment.