/*---------------------------------------------------------------------------*\ ========= | \\ / 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 "polyPatch.H" #include "addToRunTimeSelectionTable.H" #include "polyBoundaryMesh.H" #include "polyMesh.H" #include "primitiveMesh.H" #include "SubField.H" #include "entry.H" #include "dictionary.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { defineTypeNameAndDebug(polyPatch, 0); int polyPatch::disallowGenericPolyPatch ( debug::debugSwitch("disallowGenericPolyPatch", 0) ); defineRunTimeSelectionTable(polyPatch, word); defineRunTimeSelectionTable(polyPatch, dictionary); addToRunTimeSelectionTable(polyPatch, polyPatch, word); addToRunTimeSelectionTable(polyPatch, polyPatch, dictionary); } // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // void Foam::polyPatch::movePoints(const pointField& p) { primitivePatch::clearGeom(); } void Foam::polyPatch::movePoints(PstreamBuffers&, const pointField& p) { primitivePatch::clearGeom(); } void Foam::polyPatch::topoChange(PstreamBuffers&) { primitivePatch::clearGeom(); clearAddressing(); } void Foam::polyPatch::clearGeom() { primitivePatch::clearGeom(); } void Foam::polyPatch::rename(const wordList& newNames) { name_ = newNames[index_]; } void Foam::polyPatch::reorder(const labelUList& newToOldIndex) { index_ = findIndex(newToOldIndex, index_); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::polyPatch::polyPatch ( const word& name, const label size, const label start, const label index, const polyBoundaryMesh& bm ) : patchIdentifier(name, index), primitivePatch ( faceSubList(bm.mesh().faces(), size, start), bm.mesh().points() ), start_(start), boundaryMesh_(bm), faceCellsPtr_(nullptr), mePtr_(nullptr) {} Foam::polyPatch::polyPatch ( const word& name, const dictionary& dict, const label index, const polyBoundaryMesh& bm ) : patchIdentifier(name, dict, index), primitivePatch ( faceSubList ( bm.mesh().faces(), dict.lookup