mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Use reduce to ensure parallel filtering is synchronised.
This commit is contained in:
@ -82,6 +82,8 @@ void Foam::conformalVoronoiMesh::calcDualMesh
|
|||||||
{
|
{
|
||||||
label nInitialBadQualityFaces = checkPolyMeshQuality(points).size();
|
label nInitialBadQualityFaces = checkPolyMeshQuality(points).size();
|
||||||
|
|
||||||
|
reduce(nInitialBadQualityFaces, sumOp<label>());
|
||||||
|
|
||||||
Info<< nl << "Initial check before face collapse, found "
|
Info<< nl << "Initial check before face collapse, found "
|
||||||
<< nInitialBadQualityFaces << " bad quality faces"
|
<< nInitialBadQualityFaces << " bad quality faces"
|
||||||
<< endl;
|
<< endl;
|
||||||
@ -145,10 +147,16 @@ void Foam::conformalVoronoiMesh::calcDualMesh
|
|||||||
|
|
||||||
nBadQualityFaces = wrongFaces.size();
|
nBadQualityFaces = wrongFaces.size();
|
||||||
|
|
||||||
|
reduce(nBadQualityFaces, sumOp<label>());
|
||||||
|
|
||||||
Info<< nl << "Found " << nBadQualityFaces
|
Info<< nl << "Found " << nBadQualityFaces
|
||||||
<< " bad quality faces" << endl;
|
<< " bad quality faces" << endl;
|
||||||
|
|
||||||
if (lastWrongFaces == wrongFaces)
|
bool sameFacesAsLastTime(lastWrongFaces == wrongFaces);
|
||||||
|
|
||||||
|
reduce(sameFacesAsLastTime, andOp<bool>());
|
||||||
|
|
||||||
|
if (sameFacesAsLastTime)
|
||||||
{
|
{
|
||||||
Info<< nl << "Consecutive iterations found the same set "
|
Info<< nl << "Consecutive iterations found the same set "
|
||||||
<< "of bad quality faces." << endl;
|
<< "of bad quality faces." << endl;
|
||||||
@ -523,6 +531,8 @@ void Foam::conformalVoronoiMesh::smoothSurface
|
|||||||
dualPtIndexMap
|
dualPtIndexMap
|
||||||
);
|
);
|
||||||
|
|
||||||
|
reduce(nCollapsedFaces, sumOp<label>());
|
||||||
|
|
||||||
reindexDualVertices(dualPtIndexMap);
|
reindexDualVertices(dualPtIndexMap);
|
||||||
|
|
||||||
mergeCloseDualVertices(pts, boundaryPts);
|
mergeCloseDualVertices(pts, boundaryPts);
|
||||||
@ -759,6 +769,8 @@ void Foam::conformalVoronoiMesh::collapseFaces
|
|||||||
deferredCollapseFaces
|
deferredCollapseFaces
|
||||||
);
|
);
|
||||||
|
|
||||||
|
reduce(nCollapsedFaces, sumOp<label>());
|
||||||
|
|
||||||
reindexDualVertices(dualPtIndexMap);
|
reindexDualVertices(dualPtIndexMap);
|
||||||
|
|
||||||
mergeCloseDualVertices(pts, boundaryPts);
|
mergeCloseDualVertices(pts, boundaryPts);
|
||||||
|
|||||||
Reference in New Issue
Block a user