FreeFOAM The Cross-Platform CFD Toolkit
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) 1991-2010 OpenCFD Ltd.
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 <meshTools/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 
54 
55  // Private Member Functions
56 
57  //- Disallow default bitwise copy construct
58  cellSet(const cellSet&);
59 
60 public:
61 
62  //- Runtime type information
63  TypeName("cellSet");
64 
65 
66  // Constructors
67 
68 
69  //- Construct from IOobject. No checking.
70  cellSet(const IOobject& obj);
71 
72  //- Construct from polyMesh and name. Checks for valid cell ids.
73  cellSet
74  (
75  const polyMesh& mesh,
76  const word& name,
79  );
80 
81  //- Construct empty from size of labelHashSet
82  cellSet
83  (
84  const polyMesh& mesh,
85  const word& name,
86  const label sizes,
88  );
89 
90  //- Construct from existing set
91  cellSet
92  (
93  const polyMesh& mesh,
94  const word& name,
95  const topoSet&,
97  );
98 
99  //- Construct from labelHashSet
100  cellSet
101  (
102  const polyMesh& mesh,
103  const word& name,
104  const labelHashSet&,
106  );
107 
108 
109  // Used for tetMesh cellSet only.
110 
111  //- Construct from objectRegistry and name.
112  cellSet
113  (
114  const Time&,
115  const word& name,
118  );
119 
120  //- Construct empty from objectRegistry.
121  cellSet
122  (
123  const Time&,
124  const word& name,
125  const label size,
127  );
128 
129  //- Construct from labelHashSet
130  cellSet
131  (
132  const Time&,
133  const word& name,
134  const labelHashSet&,
136  );
137 
138 
139  // Destructor
140 
141  virtual ~cellSet();
142 
143 
144  // Member functions
145 
146  //- Sync cellSet across coupled patches.
147  virtual void sync(const polyMesh& mesh)
148  {}
149 
150  //- Return max index+1.
151  virtual label maxSize(const polyMesh& mesh) const;
152 
153  //- Update any stored data for new labels
154  virtual void updateMesh(const mapPolyMesh& morphMap);
155 
156  //- Write maxLen items with label and coordinates.
157  virtual void writeDebug
158  (
159  Ostream& os,
160  const primitiveMesh&,
161  const label maxLen
162  ) const;
163 
164 };
165 
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 } // End namespace Foam
170 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
173 #endif
174 
175 // ************************ vim: set sw=4 sts=4 et: ************************ //