Commit 96a3de7a authored by mattijs's avatar mattijs
Browse files

ENH: work with processors with 0 cells. polyMesh::directions, checkMesh.

parent 9c694034
...@@ -12,6 +12,7 @@ bool Foam::checkSync(const wordList& names) ...@@ -12,6 +12,7 @@ bool Foam::checkSync(const wordList& names)
List<wordList> allNames(Pstream::nProcs()); List<wordList> allNames(Pstream::nProcs());
allNames[Pstream::myProcNo()] = names; allNames[Pstream::myProcNo()] = names;
Pstream::gatherList(allNames); Pstream::gatherList(allNames);
Pstream::scatterList(allNames);
bool hasError = false; bool hasError = false;
...@@ -72,8 +73,8 @@ Foam::label Foam::checkTopology ...@@ -72,8 +73,8 @@ Foam::label Foam::checkTopology
Info<< " ***FaceZone " << mesh.faceZones()[zoneI].name() Info<< " ***FaceZone " << mesh.faceZones()[zoneI].name()
<< " is not correctly synchronised" << " is not correctly synchronised"
<< " across coupled boundaries." << " across coupled boundaries."
<< " (coupled faces both" << " (coupled faces are either not both "
<< " present in set but with opposite flipmap)" << endl; << " present in set or have same flipmap)" << endl;
noFailedChecks++; noFailedChecks++;
} }
} }
......
...@@ -85,6 +85,9 @@ void Foam::polyMesh::calcDirections() const ...@@ -85,6 +85,9 @@ void Foam::polyMesh::calcDirections() const
} }
} }
reduce(nEmptyPatches, maxOp<label>());
reduce(nWedgePatches, maxOp<label>());
if (nEmptyPatches) if (nEmptyPatches)
{ {
reduce(emptyDirVec, sumOp<vector>()); reduce(emptyDirVec, sumOp<vector>());
......
...@@ -498,10 +498,9 @@ bool Foam::faceZone::checkParallelSync(const bool report) const ...@@ -498,10 +498,9 @@ bool Foam::faceZone::checkParallelSync(const bool report) const
break; break;
} }
} }
else if (myZoneFlip[bFaceI] == neiZoneFlip[bFaceI])
// Flip state should be opposite.
if (myZoneFlip[bFaceI] == neiZoneFlip[bFaceI])
{ {
// Flip state should be opposite.
hasError = true; hasError = true;
if (report) if (report)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment