/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2011-2026 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 "localPointRegion.H" #include "syncTools.H" #include "polyMesh.H" #include "polyTopoChangeMap.H" #include "globalIndex.H" #include "indirectPrimitivePatch.H" #include "dummyTransform.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { defineTypeNameAndDebug(localPointRegion, 0); // Reduction class to get minimum value over face. class minEqOpFace { public: void operator()(face& x, const face& y) const { if (x.size()) { label j = 0; forAll(x, i) { x[i] = min(x[i], y[j]); j = y.rcIndex(j); } } } }; } // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // Are two lists identical either in forward or in reverse order. bool Foam::localPointRegion::isDuplicate ( const face& f0, const face& f1, const bool forward ) { label fp1 = findIndex(f1, f0[0]); if (fp1 == -1) { return false; } forAll(f0, fp0) { if (f0[fp0] != f1[fp1]) { return false; } if (forward) { fp1 = f1.fcIndex(fp1); } else { fp1 = f1.rcIndex(fp1); } } return true; } // Count regions per point void Foam::localPointRegion::countPointRegions ( const polyMesh& mesh, const boolList& candidatePoint, const Map