mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: incorrect blocked face synchronisation crashes regionSplit (#1370)
- now catch these and emit a warning. Still need to investigate the root cause in the caller(s) or regionSplit.
This commit is contained in:
committed by
Andrew Heather
parent
d2db25ad81
commit
658d660333
@ -534,6 +534,8 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::reduceRegions
|
||||
// Buffer for swapping boundary information
|
||||
labelList nbrRegion(mesh().nBoundaryFaces());
|
||||
|
||||
bool emitWarning = true;
|
||||
|
||||
do
|
||||
{
|
||||
if (debug)
|
||||
@ -599,9 +601,22 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::reduceRegions
|
||||
const label sent = localToGlobal[orig];
|
||||
const label recv = patchNbrRegion[patchFacei];
|
||||
|
||||
// Record the minimum value seen
|
||||
if (recv < sent)
|
||||
if (recv == UNASSIGNED)
|
||||
{
|
||||
if (emitWarning)
|
||||
{
|
||||
Pout<<"Warning in regionSplit:"
|
||||
" received unassigned on "
|
||||
<< pp.name() << " at patchFace "
|
||||
<< patchFacei
|
||||
<< ". Check synchronisation in caller"
|
||||
<< nl;
|
||||
}
|
||||
}
|
||||
else if (recv < sent)
|
||||
{
|
||||
// Record the minimum value seen
|
||||
|
||||
auto fnd = updateLookup.find(sent);
|
||||
if (!fnd.found())
|
||||
{
|
||||
@ -646,6 +661,7 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::reduceRegions
|
||||
<< " local regions" << endl;
|
||||
}
|
||||
|
||||
emitWarning = false;
|
||||
// Continue until there are no further changes
|
||||
}
|
||||
while (returnReduce(!updateLookup.empty(), orOp<bool>()));
|
||||
|
||||
Reference in New Issue
Block a user