1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | cfMesh: A library for mesh generation
5 \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6 \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of cfMesh.
11 cfMesh 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 3 of the License, or (at your
14 option) any later version.
16 cfMesh 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 cfMesh. If not, see <http://www.gnu.org/licenses/>.
28 Mesh with geometry and topology information
33 \*---------------------------------------------------------------------------*/
35 #ifndef polyMeshGenCells_H
36 #define polyMeshGenCells_H
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 #include "polyMeshGenFaces.H"
41 #include "cellListPMG.H"
46 class polyMeshGenAddressing;
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 class polyMeshGenCells
51 : public polyMeshGenFaces
60 std::map<label, meshSubset> cellSubsets_;
62 //- primitive mesh which calculates addressing
63 mutable polyMeshGenAddressing* addressingDataPtr_;
65 // Private member functions
66 //- calculate owner and neighbour
67 void calculateOwnersAndNeighbours() const;
69 //- calculate mesh addressing
70 void calculateAddressingData() const;
72 //- clear all pointer data
73 void clearOut() const;
75 // Disallow bitwise assignment
76 void operator=(const polyMeshGenCells&);
78 polyMeshGenCells(const polyMeshGenCells&);
82 friend class polyMeshGenModifier;
86 polyMeshGenCells(const Time&);
88 //- Construct from components without the boundary
92 const pointField& points,
93 const faceList& faces,
97 //- Construct from components with the boundary
101 const pointField& points,
102 const faceList& faces,
103 const cellList& cells,
104 const wordList& patchNames,
105 const labelList& patchStart,
106 const labelList& nFacesInPatch
114 inline const cellListPMG& cells() const;
116 //- addressing which may be needed
117 const polyMeshGenAddressing& addressingData() const;
119 //- clear addressing data
120 void clearAddressingData() const;
123 label addCellSubset(const word&);
124 void removeCellSubset(const label);
125 word cellSubsetName(const label) const;
126 label cellSubsetIndex(const word&) const;
127 inline void addCellToSubset(const label, const label);
128 inline void removeCellFromSubset(const label, const label);
129 inline void cellInSubsets(const label, DynList<label>&) const;
130 inline void cellSubsetIndices(DynList<label>&) const;
131 template<class ListType>
132 inline void cellsInSubset(const label, ListType&) const;
133 template<class ListType>
134 inline void updateCellSubsets(const ListType&);
135 inline void updateCellSubsets(const VRWGraph&);
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 } // End namespace Foam
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 #include "polyMeshGenCellsI.H"
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //