#include "PatchTools.H" #include "checkGeometry.H" #include "polyMesh.H" #include "cellSet.H" #include "faceSet.H" #include "pointSet.H" #include "edgeHashes.H" #include "wedgePolyPatch.H" #include "unitConversion.H" #include "polyMeshTetDecomposition.H" #include "checkTools.H" #include "functionObject.H" #include "vtkSurfaceWriter.H" #include "writer.H" #include "cyclicACMIPolyPatch.H" #include "Time.H" // Find wedge with opposite orientation. Note: does not actually check that // it is opposite, only that it has opposite normal and same axis Foam::label Foam::findOppositeWedge ( const polyMesh& mesh, const wedgePolyPatch& wpp ) { const polyBoundaryMesh& patches = mesh.boundaryMesh(); scalar wppCosAngle = wpp.cosAngle(); forAll(patches, patchi) { if ( patchi != wpp.index() && patches[patchi].size() && isA(patches[patchi]) ) { const wedgePolyPatch& pp = refCast(patches[patchi]); // Calculate (cos of) angle to wpp (not pp!) centre normal scalar ppCosAngle = wpp.centreNormal() & pp.n(); if ( pp.size() == wpp.size() && mag(pp.axis() & wpp.axis()) >= (1-1e-3) && mag(ppCosAngle - wppCosAngle) >= 1e-3 ) { return patchi; } } } return -1; } bool Foam::checkWedges ( const polyMesh& mesh, const bool report, const Vector