/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ 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 2 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, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Description Makes internal faces into boundary faces. Does not duplicate points. Use mergeOrSplitBaffles if you want this. Note: if any coupled patch face is selected for baffling automatically the opposite member is selected for baffling as well. Note that this is the same as repatching. This was added only for convenience so you don't have to filter coupled boundary out of your set. \*---------------------------------------------------------------------------*/ #include "syncTools.H" #include "argList.H" #include "Time.H" #include "faceSet.H" #include "polyTopoChange.H" #include "polyModifyFace.H" #include "polyAddFace.H" #include "ReadFields.H" #include "volFields.H" #include "surfaceFields.H" using namespace Foam; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Main program: int main(int argc, char *argv[]) { argList::validArgs.append("set"); argList::validArgs.append("patch"); argList::validOptions.insert("additionalPatches", "(patch2 .. patchN)"); argList::validOptions.insert("overwrite", ""); # include "setRootCase.H" # include "createTime.H" runTime.functionObjects().off(); # include "createMesh.H" const word oldInstance = mesh.pointsInstance(); const polyBoundaryMesh& patches = mesh.boundaryMesh(); const faceZoneMesh& faceZones = mesh.faceZones(); // Faces to baffle word setName(args.additionalArgs()[0]); Info<< "Reading faceSet from " << setName << nl << endl; faceSet facesToSplit(mesh, setName); // Make sure set is synchronised across couples facesToSplit.sync(mesh); Info<< "Read " << returnReduce(facesToSplit.size(), sumOp