1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "boundaryToFace.H"
29 #include "addToRunTimeSelectionTable.H"
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
36 defineTypeNameAndDebug(boundaryToFace, 0);
38 addToRunTimeSelectionTable(topoSetSource, boundaryToFace, word);
40 addToRunTimeSelectionTable(topoSetSource, boundaryToFace, istream);
45 Foam::topoSetSource::addToUsageTable Foam::boundaryToFace::usage_
47 boundaryToFace::typeName,
48 "\n Usage: boundaryToFace\n\n"
49 " Select all boundary faces\n\n"
53 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
55 void Foam::boundaryToFace::combine(topoSet& set, const bool add) const
59 label faceI = mesh().nInternalFaces();
60 faceI < mesh().nFaces();
64 addOrDelete(set, faceI, add);
69 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
71 // Construct from components
72 Foam::boundaryToFace::boundaryToFace(const polyMesh& mesh)
78 // Construct from dictionary
79 Foam::boundaryToFace::boundaryToFace(const polyMesh& mesh, const dictionary&)
85 // Construct from Istream
86 Foam::boundaryToFace::boundaryToFace
96 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
98 Foam::boundaryToFace::~boundaryToFace()
102 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
104 void Foam::boundaryToFace::applyToSet
106 const topoSetSource::setAction action,
110 if ((action == topoSetSource::NEW) || (action == topoSetSource::ADD))
112 Info<< " Adding all boundary faces ..." << endl;
116 else if (action == topoSetSource::DELETE)
118 Info<< " Removing all boundary faces ..." << endl;
125 // ************************************************************************* //