/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2011-2024 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 . Application createBaffles Description Makes faces into boundary faces. Does not duplicate points. Notes: - If any coupled patch face is selected for baffling the opposite member has to be selected for baffling as well. - If fields are being modified then boundary conditions must be specified within the patch's patchFields sub-dictionary. - Any patches left with no faces will be removed, except for patches of coupled, internal, of non-conformal type \*---------------------------------------------------------------------------*/ #include "argList.H" #include "Time.H" #include "polyTopoChange.H" #include "ReadFields.H" #include "volFields.H" #include "surfaceFields.H" #include "pointFields.H" #include "fvMeshMapper.H" #include "faceSelection.H" #include "searchableSurface.H" #include "fvMeshTools.H" #include "systemDict.H" #include "processorPolyPatch.H" #include "internalPolyPatch.H" #include "nonConformalPolyPatch.H" using namespace Foam; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // void filterPatches(fvMesh& mesh, const HashSet& bafflePatches) { // Remove any zero-sized patches, except for constraint types, and any // specified in the system dictionary const polyBoundaryMesh& bMesh = mesh.boundaryMesh(); label newPatchi = 0; // List of patch's new indices labelList oldToNew(bMesh.size(), -1); // Add all the kept non-processor patches to the list first forAll(bMesh, patchi) { const polyPatch& pp = bMesh[patchi]; if (!isA(pp)) { if ( bafflePatches.found(pp.name()) || fvPatch::constraintType(pp.type()) || returnReduce(pp.size(), sumOp