cellSet.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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
19  for more details.
20 
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/>.
23 
24 Class
25  Foam::cellSet
26 
27 Description
28  A collection of cell labels.
29 
30 SourceFiles
31  cellSet.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef cellSet_H
36 #define cellSet_H
37 
38 #include "topoSet.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class cellSet Declaration
47 \*---------------------------------------------------------------------------*/
48 
49 class cellSet
50 :
51  public topoSet
52 {
53  // Private Member Functions
54 
55  //- Disallow default bitwise copy construct
56  cellSet(const cellSet&);
57 
58 
59 public:
60 
61  //- Runtime type information
62  TypeName("cellSet");
63 
64 
65  // Constructors
66 
67  //- Construct from IOobject. No checking.
68  cellSet(const IOobject& obj);
69 
70  //- Construct from polyMesh and name. Checks for valid cell ids.
71  cellSet
72  (
73  const polyMesh& mesh,
74  const word& name,
77  );
78 
79  //- Construct empty from size of labelHashSet
80  cellSet
81  (
82  const polyMesh& mesh,
83  const word& name,
84  const label sizes,
86  );
87 
88  //- Construct from existing set
89  cellSet
90  (
91  const polyMesh& mesh,
92  const word& name,
93  const topoSet&,
95  );
96 
97  //- Construct from labelHashSet
98  cellSet
99  (
100  const polyMesh& mesh,
101  const word& name,
102  const labelHashSet&,
104  );
105 
106 
107  // Used for tetMesh cellSet only.
108 
109  //- Construct from objectRegistry and name.
110  cellSet
111  (
112  const Time&,
113  const word& name,
116  );
117 
118  //- Construct empty from objectRegistry.
119  cellSet
120  (
121  const Time&,
122  const word& name,
123  const label size,
125  );
126 
127  //- Construct from labelHashSet
128  cellSet
129  (
130  const Time&,
131  const word& name,
132  const labelHashSet&,
134  );
135 
136 
137  //- Destructor
138  virtual ~cellSet();
139 
140 
141  // Member functions
142 
143  //- Sync cellSet across coupled patches.
144  virtual void sync(const polyMesh& mesh)
145  {}
146 
147  //- Return max index+1.
148  virtual label maxSize(const polyMesh& mesh) const;
149 
150  //- Update any stored data for new labels
151  virtual void updateMesh(const mapPolyMesh& morphMap);
152 
153  //- Write maxLen items with label and coordinates.
154  virtual void writeDebug
155  (
156  Ostream& os,
157  const primitiveMesh&,
158  const label maxLen
159  ) const;
160 };
161 
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 } // End namespace Foam
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 #endif
170 
171 // ************************************************************************* //
TypeName("cellSet")
Runtime type information.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:158
General set of labels of mesh quantity (points, cells, faces).
Definition: topoSet.H:61
virtual void writeDebug(Ostream &os, const primitiveMesh &, const label maxLen) const
Write maxLen items with label and coordinates.
Definition: cellSet.C:232
A collection of cell labels.
Definition: cellSet.H:48
A class for handling words, derived from string.
Definition: word.H:59
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
dynamicFvMesh & mesh
virtual void sync(const polyMesh &mesh)
Sync cellSet across coupled patches.
Definition: cellSet.H:143
Namespace for OpenFOAM.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
Cell-face mesh analysis engine.
Definition: primitiveMesh.H:74
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:91
virtual label maxSize(const polyMesh &mesh) const
Return max index+1.
Definition: cellSet.C:219
readOption
Enumeration defining the read options.
Definition: IOobject.H:106
label size() const
Return number of elements in table.
const word & name() const
Return name.
Definition: IOobject.H:260
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
writeOption
Enumeration defining the write options.
Definition: IOobject.H:115
virtual void updateMesh(const mapPolyMesh &morphMap)
Update any stored data for new labels.
Definition: cellSet.C:225
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
virtual ~cellSet()
Destructor.
Definition: cellSet.C:213