FreeFOAM The Cross-Platform CFD Toolkit
primitiveMeshI.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 Description
25 
26 \*---------------------------------------------------------------------------*/
27 
28 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
29 
30 namespace Foam
31 {
32 
33 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
34 
35 inline label primitiveMesh::nInternalPoints() const
36 {
37  return nInternalPoints_;
38 }
39 
40 
41 inline label primitiveMesh::nPoints() const
42 {
43  return nPoints_;
44 }
45 
46 
47 inline label primitiveMesh::nInternal0Edges() const
48 {
49  // Force edge calculation
50  (void)nEdges();
51  return nInternal0Edges_;
52 }
53 
54 
55 inline label primitiveMesh::nInternal1Edges() const
56 {
57  // Force edge calculation
58  (void)nEdges();
59  return nInternal1Edges_;
60 }
61 
62 
63 inline label primitiveMesh::nInternalEdges() const
64 {
65  // Force edge calculation
66  (void)nEdges();
67  return nInternalEdges_;
68 }
69 
70 
71 inline label primitiveMesh::nEdges() const
72 {
73  if (nEdges_ < 0)
74  {
75  nEdges_ = edges().size();
76  }
77 
78  return nEdges_;
79 }
80 
81 
82 inline label primitiveMesh::nInternalFaces() const
83 {
84  return nInternalFaces_;
85 }
86 
87 
88 inline label primitiveMesh::nFaces() const
89 {
90  return nFaces_;
91 }
92 
93 
94 inline label primitiveMesh::nCells() const
95 {
96  return nCells_;
97 }
98 
99 
100 inline bool primitiveMesh::isInternalFace(const label faceIndex) const
101 {
102  return faceIndex < nInternalFaces();
103 }
104 
105 
106 inline bool primitiveMesh::hasCellShapes() const
107 {
108  return cellShapesPtr_;
109 }
110 
111 
112 inline bool primitiveMesh::hasEdges() const
113 {
114  return edgesPtr_;
115 }
116 
117 
118 inline bool primitiveMesh::hasCellCells() const
119 {
120  return ccPtr_;
121 }
122 
123 
124 inline bool primitiveMesh::hasEdgeCells() const
125 {
126  return ecPtr_;
127 }
128 
129 
130 inline bool primitiveMesh::hasPointCells() const
131 {
132  return pcPtr_;
133 }
134 
135 
136 inline bool primitiveMesh::hasCells() const
137 {
138  return cfPtr_;
139 }
140 
141 
142 inline bool primitiveMesh::hasEdgeFaces() const
143 {
144  return efPtr_;
145 }
146 
147 
148 inline bool primitiveMesh::hasPointFaces() const
149 {
150  return pfPtr_;
151 }
152 
153 
154 inline bool primitiveMesh::hasCellEdges() const
155 {
156  return cePtr_;
157 }
158 
159 
160 inline bool primitiveMesh::hasFaceEdges() const
161 {
162  return fePtr_;
163 }
164 
165 
166 inline bool primitiveMesh::hasPointEdges() const
167 {
168  return pePtr_;
169 }
170 
171 
172 inline bool primitiveMesh::hasPointPoints() const
173 {
174  return ppPtr_;
175 }
176 
177 
178 inline bool primitiveMesh::hasCellPoints() const
179 {
180  return cpPtr_;
181 }
182 
183 
184 inline bool primitiveMesh::hasCellCentres() const
185 {
186  return cellCentresPtr_;
187 }
188 
189 
190 inline bool primitiveMesh::hasFaceCentres() const
191 {
192  return faceCentresPtr_;
193 }
194 
195 
196 inline bool primitiveMesh::hasCellVolumes() const
197 {
198  return cellVolumesPtr_;
199 }
200 
201 
202 inline bool primitiveMesh::hasFaceAreas() const
203 {
204  return faceAreasPtr_;
205 }
206 
207 
208 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
209 
210 } // End namespace Foam
211 
212 // ************************ vim: set sw=4 sts=4 et: ************************ //