blockMesh: Added support for automatically reordering cyclic patches
Patch contributed by Mattijs Janssens Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1692
This commit is contained in:
@ -54,7 +54,9 @@ Usage
|
||||
|
||||
#include "blockMesh.H"
|
||||
#include "attachPolyTopoChanger.H"
|
||||
#include "polyTopoChange.H"
|
||||
#include "emptyPolyPatch.H"
|
||||
#include "cyclicPolyPatch.H"
|
||||
#include "cellSet.H"
|
||||
|
||||
#include "argList.H"
|
||||
@ -377,6 +379,30 @@ int main(int argc, char *argv[])
|
||||
mesh.addZones(List<pointZone*>(0), List<faceZone*>(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<cyclicPolyPatch>(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()));
|
||||
|
||||
@ -390,9 +416,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// write some information
|
||||
//
|
||||
// Write summary
|
||||
{
|
||||
const polyPatchList& patches = mesh.boundaryMesh();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user