BUG: reduce inside if statement, not valid on all processors.

This commit is contained in:
graham
2011-07-06 22:20:27 +01:00
parent 8cea9a58dc
commit 391f0d3b54
2 changed files with 9 additions and 9 deletions

View File

@ -1630,12 +1630,9 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::checkPolyMeshQuality
} }
} }
if (checkFaces.size() < fAreas.size())
{
Info<< "Excluding " Info<< "Excluding "
<< returnReduce(fAreas.size() - checkFaces.size(), sumOp<label>()) << returnReduce(fAreas.size() - checkFaces.size(), sumOp<label>())
<< " faces from check, < " << faceAreaLimit << " area" << endl; << " faces from check, < " << faceAreaLimit << " area" << endl;
}
motionSmoother::checkMesh motionSmoother::checkMesh
( (

View File

@ -696,10 +696,13 @@ void Foam::conformalVoronoiMesh::findRemainingProtrusionSet
} }
} }
if (returnReduce(protrudingCells.size(), sumOp<label>()) > 0) label protrudingCellsSize = protrudingCells.size();
reduce(protrudingCellsSize, sumOp<label>());
if (protrudingCellsSize > 0)
{ {
Info<< nl << "Found " Info<< nl << "Found " << protrudingCellsSize
<< returnReduce(protrudingCells.size(), sumOp<label>())
<< " cells protruding from the surface, writing cellSet " << " cells protruding from the surface, writing cellSet "
<< protrudingCells.name() << protrudingCells.name()
<< endl; << endl;