cellSets.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-2013 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::cellSets
26 
27 Description
28 
29 \*---------------------------------------------------------------------------*/
30 
31 #ifndef cellSets_H
32 #define cellSets_H
33 
34 #include "labelList.H"
35 
36 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
37 
38 namespace Foam
39 {
40 
41 /*---------------------------------------------------------------------------*\
42  Class cellSets Declaration
43 \*---------------------------------------------------------------------------*/
44 
45 class cellSets
46 {
47 public:
48 
53  label nPolys;
54 
61 
62 
63  // Constructors
64 
65  //- Construct given the number ov cells
66  cellSets(const label nCells)
67  :
68  nTets(0),
69  nPyrs(0),
70  nPrisms(0),
71  nHexesWedges(0),
72  nPolys(0),
73 
74  tets(nCells),
75  pyrs(nCells),
76  prisms(nCells),
77  wedges(nCells),
78  hexes(nCells),
79  polys(nCells)
80  {}
81 
82 
83  // Member Functions
84 
85  void setSize(const label nCells)
86  {
87  nTets = 0;
88  nPyrs = 0;
89  nPrisms = 0;
90  nHexesWedges = 0;
91  nPolys = 0;
92 
93  tets.setSize(nCells);
94  pyrs.setSize(nCells);
95  prisms.setSize(nCells);
96  wedges.setSize(nCells);
97  hexes.setSize(nCells);
98  polys.setSize(nCells);
99  }
100 
101 };
102 
103 
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
105 
106 } // End namespace Foam
107 
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 
110 #endif
111 
112 // ************************************************************************* //
labelList polys
Definition: cellSets.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
labelList hexes
Definition: cellSets.H:58
label nPyrs
Definition: cellSets.H:49
label nPolys
Definition: cellSets.H:52
labelList pyrs
Definition: cellSets.H:55
labelList tets
Definition: cellSets.H:54
void setSize(const label nCells)
Definition: cellSets.H:84
label nHexesWedges
Definition: cellSets.H:51
labelList prisms
Definition: cellSets.H:56
label nTets
Definition: cellSets.H:48
void setSize(const label)
Reset size of List.
Definition: List.C:281
labelList wedges
Definition: cellSets.H:57
label nPrisms
Definition: cellSets.H:50
cellSets(const label nCells)
Construct given the number ov cells.
Definition: cellSets.H:65
Namespace for OpenFOAM.