diff --git a/applications/utilities/mesh/generation/blockMesh/blockMesh.C b/applications/utilities/mesh/generation/blockMesh/blockMesh.C index 2e112570a1..41e03bde29 100644 --- a/applications/utilities/mesh/generation/blockMesh/blockMesh.C +++ b/applications/utilities/mesh/generation/blockMesh/blockMesh.C @@ -60,7 +60,9 @@ Usage #include "blockMesh.H" #include "attachPolyTopoChanger.H" +#include "polyTopoChange.H" #include "emptyPolyPatch.H" +#include "cyclicPolyPatch.H" #include "cellSet.H" #include "argList.H" @@ -381,6 +383,30 @@ int main(int argc, char *argv[]) mesh.addZones(List(0), List(0), cz); } + + // Detect any cyclic patches and force re-ordering of the faces + { + const polyPatchList& patches = mesh.boundaryMesh(); + bool hasCyclic = false; + forAll(patches, patchi) + { + if (isA(patches[patchi])) + { + hasCyclic = true; + break; + } + } + + if (hasCyclic) + { + Info<< nl << "Detected cyclic patches; ordering boundary faces" + << endl; + polyTopoChange meshMod(mesh); + meshMod.changeMesh(mesh, false); + } + } + + // Set the precision of the points data to 10 IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision())); @@ -409,9 +435,7 @@ int main(int argc, char *argv[]) } } - // - // write some information - // + // Write summary { const polyPatchList& patches = mesh.boundaryMesh();