#include "checkGeometry.H" #include "polyMesh.H" #include "cellSet.H" #include "faceSet.H" #include "pointSet.H" #include "EdgeMap.H" #include "wedgePolyPatch.H" #include "unitConversion.H" #include "polyMeshTetDecomposition.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.centreNormal()&wpp.patchNormal(); 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.patchNormal(); 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