#include "checkTopology.H" #include "polyMesh.H" #include "Time.H" #include "regionSplit.H" #include "cellSet.H" #include "faceSet.H" #include "pointSet.H" #include "IOmanip.H" bool Foam::checkSync(const wordList& names) { List allNames(Pstream::nProcs()); allNames[Pstream::myProcNo()] = names; Pstream::gatherList(allNames); Pstream::scatterList(allNames); bool hasError = false; for (label procI = 1; procI < allNames.size(); procI++) { if (allNames[procI] != allNames[0]) { hasError = true; Info<< " ***Inconsistent zones across processors, " "processor 0 has zones:" << allNames[0] << ", processor " << procI << " has zones:" << allNames[procI] << endl; } } return hasError; } Foam::label Foam::checkTopology ( const polyMesh& mesh, const bool allTopology, const bool allGeometry ) { label noFailedChecks = 0; Info<< "Checking topology..." << endl; // Check if the boundary definition is unique mesh.boundaryMesh().checkDefinition(true); // Check if the boundary processor patches are correct mesh.boundaryMesh().checkParallelSync(true); // Check names of zones are equal mesh.cellZones().checkDefinition(true); if (mesh.cellZones().checkParallelSync(true)) { noFailedChecks++; } mesh.faceZones().checkDefinition(true); if (mesh.faceZones().checkParallelSync(true)) { noFailedChecks++; } mesh.pointZones().checkDefinition(true); if (mesh.pointZones().checkParallelSync(true)) { noFailedChecks++; } { pointSet points(mesh, "unusedPoints", mesh.nPoints()/100); if (mesh.checkPoints(true, &points)) { noFailedChecks++; label nPoints = returnReduce(points.size(), sumOp