/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation Copyright (C) 2016-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- 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 createPatch Group grpMeshManipulationUtilities Description Create patches out of selected boundary faces, which are either from existing patches or from a faceSet. More specifically it: - creates new patches (from selected boundary faces). Synchronise faces on coupled patches. - synchronises points on coupled boundaries - remove patches with 0 faces in them \*---------------------------------------------------------------------------*/ #include "cyclicPolyPatch.H" #include "syncTools.H" #include "argList.H" #include "Time.H" #include "OFstream.H" #include "meshTools.H" #include "faceSet.H" #include "IOPtrList.H" #include "polyTopoChange.H" #include "polyModifyFace.H" #include "wordRes.H" #include "processorMeshes.H" #include "IOdictionary.H" #include "regionProperties.H" #include "faceAreaWeightAMI2D.H" #include "fvMeshTools.H" #include "ReadFields.H" using namespace Foam; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { defineTemplateTypeNameAndDebug(IOPtrList, 0); } word patchName(const word& name, const fvMesh& mesh0, const fvMesh& mesh1) { word pName(name != "none" ? name : word::null); pName += mesh0.name(); pName += "_to_"; pName += mesh1.name(); return pName; } void matchPatchFaces ( const word& entryName, const word& AMIMethod, const dictionary& AMIDict, const PtrList& meshes, const label meshi, const label nSourcei, const label sourcei, const labelList& patchesi, const label meshj, const label nSourcej, const label sourcej, const labelList& patchesj, DynamicList& interfaceMesh0, DynamicList