1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 \*---------------------------------------------------------------------------*/
28 #include "mapPolyMesh.H"
31 #include "addToRunTimeSelectionTable.H"
33 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
38 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
40 defineTypeNameAndDebug(cellSet, 0);
42 addToRunTimeSelectionTable(topoSet, cellSet, word);
43 addToRunTimeSelectionTable(topoSet, cellSet, size);
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 cellSet::cellSet(const IOobject& obj)
50 topoSet(obj, typeName)
62 topoSet(mesh, typeName, name, r, w)
64 // Make sure set within valid range
77 topoSet(mesh, name, size, w)
85 const labelHashSet& set,
89 topoSet(mesh, name, set, w)
93 // Database constructors (for when no mesh available)
107 runTime.findInstance(polyMesh::meshSubDir, "faces"),
108 polyMesh::meshSubDir/"sets",
131 runTime.findInstance(polyMesh::meshSubDir, "faces"),
132 polyMesh::meshSubDir/"sets",
146 const labelHashSet& set,
155 runTime.findInstance(polyMesh::meshSubDir, "faces"),
156 polyMesh::meshSubDir/"sets",
166 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
172 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
174 label cellSet::maxSize(const polyMesh& mesh) const
176 return mesh.nCells();
180 void cellSet::updateMesh(const mapPolyMesh& morphMap)
182 updateLabels(morphMap.reverseCellMap());
186 void Foam::cellSet::writeDebug
189 const primitiveMesh& mesh,
193 topoSet::writeDebug(os, mesh.cellCentres(), maxLen);
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 } // End namespace Foam
201 // ************************************************************************* //