/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . \*---------------------------------------------------------------------------*/ #include "PatchTools.H" #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" #include "vtkSurfaceWriter.H" #include "setWriter.H" #include "writeFile.H" #include "nonConformalCyclicPolyPatch.H" #include "checkTools.H" #include "Time.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 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