diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C index 21796ed9d6974230c9b2e1995892d2f43a91b9e9..7193d08ed630c2f1bec8a9a411102e6b4ebdd44d 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -1094,7 +1094,9 @@ int main(int argc, char *argv[]) // Update proc maps if (cellProcAddressing.headerOk()) { - if (cellProcAddressing.size() == mesh.nCells()) + bool localOk = (cellProcAddressing.size() == mesh.nCells()); + + if (returnReduce(localOk, andOp<bool>())) { Info<< "Renumbering processor cell decomposition map " << cellProcAddressing.name() << endl; @@ -1118,7 +1120,9 @@ int main(int argc, char *argv[]) if (faceProcAddressing.headerOk()) { - if (faceProcAddressing.size() == mesh.nFaces()) + bool localOk = (faceProcAddressing.size() == mesh.nFaces()); + + if (returnReduce(localOk, andOp<bool>())) { Info<< "Renumbering processor face decomposition map " << faceProcAddressing.name() << endl; @@ -1158,7 +1162,9 @@ int main(int argc, char *argv[]) if (pointProcAddressing.headerOk()) { - if (pointProcAddressing.size() == mesh.nPoints()) + bool localOk = (pointProcAddressing.size() == mesh.nPoints()); + + if (returnReduce(localOk, andOp<bool>())) { Info<< "Renumbering processor point decomposition map " << pointProcAddressing.name() << endl; @@ -1182,7 +1188,16 @@ int main(int argc, char *argv[]) if (boundaryProcAddressing.headerOk()) { - if (boundaryProcAddressing.size() != mesh.boundaryMesh().size()) + bool localOk = + ( + boundaryProcAddressing.size() + == mesh.boundaryMesh().size() + ); + if (returnReduce(localOk, andOp<bool>())) + { + // No renumbering needed + } + else { Info<< "Not writing inconsistent processor patch decomposition" << " map " << boundaryProcAddressing.filePath() << endl;