decomposePar, reconstructPar: Catch decomposition of overridden cyclics
Patch fields on cyclic patches which have overridden the cyclic constraint using a "patchType cyclic;" setting cannot be decomposed. OpenFOAM does not have processor variants of jumpCyclic, porousBafflePressure, etc... Using these conditions in a decomposed case requires the cyclic to be constrained to a single processor. This change catches this problem in decomposePar and reconstructPar and raises a fatal error, rather than continuing and silently converting these overridden boundary conditions to a standard processorCyclic patch field. Resolves bug report https://bugs.openfoam.org/view.php?id=3916
This commit is contained in:
@ -31,6 +31,7 @@ License
|
||||
#include "emptyFvPatchField.H"
|
||||
#include "emptyFvsPatchField.H"
|
||||
#include "processorCyclicFvPatch.H"
|
||||
#include "stringOps.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
@ -212,6 +213,23 @@ Foam::fvFieldReconstructor::reconstructFvVolumeField
|
||||
);
|
||||
}
|
||||
|
||||
if (patchFields[completePatchi].overridesConstraint())
|
||||
{
|
||||
OStringStream str;
|
||||
str << "\nThe field \"" << procFields[0].name()
|
||||
<< "\" on cyclic patch \""
|
||||
<< patchFields[completePatchi].patch().name()
|
||||
<< "\" cannot be reconstructed as it is not a cyclic "
|
||||
<< "patch field. A \"patchType cyclic;\" setting has "
|
||||
<< "been used to override the cyclic patch type.\n\n"
|
||||
<< "Cyclic patches like this with non-cyclic boundary "
|
||||
<< "conditions should be confined to a single "
|
||||
<< "processor using decomposition constraints.";
|
||||
FatalErrorInFunction
|
||||
<< stringOps::breakIntoIndentedLines(str.str()).c_str()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
patchFields[completePatchi].rmap
|
||||
(
|
||||
procField.boundaryField()[procPatchi],
|
||||
|
||||
Reference in New Issue
Block a user