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 "
<< returnReduce(fAreas.size() - checkFaces.size(), sumOp<label>())
<< " faces from check, < " << faceAreaLimit << " area" << endl;
}
Info<< "Excluding "
<< returnReduce(fAreas.size() - checkFaces.size(), sumOp<label>())
<< " faces from check, < " << faceAreaLimit << " area" << endl;
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 "
<< returnReduce(protrudingCells.size(), sumOp<label>())
Info<< nl << "Found " << protrudingCellsSize
<< " cells protruding from the surface, writing cellSet "
<< protrudingCells.name()
<< endl;