decomposePar: Create nonConformalProcessorCyclic fields

Previously this was creating simple processorCyclic fields on the
nonConformalProcessorCyclic patches using a patchType override. The fact
that this worked is an encouraging indication of the system's
robustness, but it is more logical to create a field which directly
corresponds to the underlying patch type.
This commit is contained in:
Will Bainbridge
2023-11-08 11:50:41 +00:00
parent d76e5468d4
commit 89c8187135

View File

@ -252,44 +252,50 @@ Foam::fvFieldDecomposer::decomposeVolField
refCast<const processorCyclicFvPatch>(procPatch)
.referPatch().nbrPatchID();
// Use `fvPatchField<Type>::New` rather than
// `new processorCyclicFvPatchField<Type>` so that derivations
// (such as non-conformal processor cyclics) are constructed
bf.set
(
procPatchi,
new processorCyclicFvPatchField<Type>
fvPatchField<Type>::New
(
procPatch.type(),
procPatch,
vf(),
mapCellToFace
(
labelUList(),
completeMesh_.lduAddr().patchAddr
(
nbrCompletePatchi
),
field.primitiveField(),
faceProcAddressingBf_[proci][procPatchi]
)
vf()
)
);
bf[procPatchi] =
mapCellToFace
(
labelUList(),
completeMesh_.lduAddr().patchAddr(nbrCompletePatchi),
field.primitiveField(),
faceProcAddressingBf_[proci][procPatchi]
);
}
else if (isA<processorFvPatch>(procPatch))
{
bf.set
(
procPatchi,
new processorFvPatchField<Type>
fvPatchField<Type>::New
(
procPatch.type(),
procPatch,
vf(),
mapCellToFace
(
completeMesh_.owner(),
completeMesh_.neighbour(),
field.primitiveField(),
faceProcAddressingBf_[proci][procPatchi]
)
vf()
)
);
bf[procPatchi] =
mapCellToFace
(
completeMesh_.owner(),
completeMesh_.neighbour(),
field.primitiveField(),
faceProcAddressingBf_[proci][procPatchi]
);
}
else
{