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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011 OpenFOAM Foundation
9  Copyright (C) 2018 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
30 
31 inline Foam::label Foam::primitiveMesh::nInternalPoints() const
32 {
33  return nInternalPoints_;
34 }
35 
36 
37 inline Foam::label Foam::primitiveMesh::nPoints() const
38 {
39  return nPoints_;
40 }
41 
42 
43 inline Foam::label Foam::primitiveMesh::nInternal0Edges() const
44 {
45  // Force edge calculation
46  (void)nEdges();
47  return nInternal0Edges_;
48 }
49 
50 
51 inline Foam::label Foam::primitiveMesh::nInternal1Edges() const
52 {
53  // Force edge calculation
54  (void)nEdges();
55  return nInternal1Edges_;
56 }
57 
58 
59 inline Foam::label Foam::primitiveMesh::nInternalEdges() const
60 {
61  // Force edge calculation
62  (void)nEdges();
63  return nInternalEdges_;
64 }
65 
66 
67 inline Foam::label Foam::primitiveMesh::nEdges() const
68 {
69  if (nEdges_ < 0)
70  {
71  nEdges_ = edges().size();
72  }
73 
74  return nEdges_;
75 }
76 
77 
78 inline Foam::label Foam::primitiveMesh::nInternalFaces() const
79 {
80  return nInternalFaces_;
81 }
82 
83 
84 inline Foam::label Foam::primitiveMesh::nBoundaryFaces() const
85 {
86  return (nFaces_ - nInternalFaces_);
87 }
88 
89 
90 inline Foam::label Foam::primitiveMesh::nFaces() const
91 {
92  return nFaces_;
93 }
94 
95 
96 inline Foam::label Foam::primitiveMesh::nCells() const
97 {
98  return nCells_;
99 }
100 
101 
102 inline bool Foam::primitiveMesh::isInternalFace(const label faceIndex) const
103 {
104  return faceIndex < nInternalFaces_;
105 }
106 
107 
109 {
110  return cellShapesPtr_;
111 }
112 
113 
114 inline bool Foam::primitiveMesh::hasEdges() const
115 {
116  return edgesPtr_;
117 }
118 
119 
121 {
122  return ccPtr_;
123 }
124 
125 
127 {
128  return ecPtr_;
129 }
130 
131 
133 {
134  return pcPtr_;
135 }
136 
137 
138 inline bool Foam::primitiveMesh::hasCells() const
139 {
140  return cfPtr_;
141 }
142 
143 
145 {
146  return efPtr_;
147 }
148 
149 
151 {
152  return pfPtr_;
153 }
154 
155 
157 {
158  return cePtr_;
159 }
160 
161 
163 {
164  return fePtr_;
165 }
166 
167 
169 {
170  return pePtr_;
171 }
172 
173 
175 {
176  return ppPtr_;
177 }
178 
179 
181 {
182  return cpPtr_;
183 }
184 
185 
187 {
188  return cellCentresPtr_;
189 }
190 
191 
193 {
194  return faceCentresPtr_;
195 }
196 
197 
199 {
200  return cellVolumesPtr_;
201 }
202 
203 
205 {
206  return faceAreasPtr_;
207 }
208 
209 
210 // ************************************************************************* //
Foam::primitiveMesh::hasPointEdges
bool hasPointEdges() const
Definition: primitiveMeshI.H:168
Foam::primitiveMesh::nInternal0Edges
label nInternal0Edges() const
Definition: primitiveMeshI.H:43
Foam::primitiveMesh::nInternalFaces
label nInternalFaces() const
Number of internal faces.
Definition: primitiveMeshI.H:78
Foam::primitiveMesh::nFaces
label nFaces() const
Number of mesh faces.
Definition: primitiveMeshI.H:90
Foam::primitiveMesh::hasCellVolumes
bool hasCellVolumes() const
Definition: primitiveMeshI.H:198
Foam::primitiveMesh::nEdges
label nEdges() const
Number of mesh edges.
Definition: primitiveMeshI.H:67
Foam::primitiveMesh::hasEdges
bool hasEdges() const
Definition: primitiveMeshI.H:114
Foam::primitiveMesh::hasCellEdges
bool hasCellEdges() const
Definition: primitiveMeshI.H:156
Foam::primitiveMesh::nInternal1Edges
label nInternal1Edges() const
Internal edges using 0 or 1 boundary point.
Definition: primitiveMeshI.H:51
Foam::primitiveMesh::hasFaceEdges
bool hasFaceEdges() const
Definition: primitiveMeshI.H:162
Foam::primitiveMesh::nCells
label nCells() const
Number of mesh cells.
Definition: primitiveMeshI.H:96
Foam::primitiveMesh::nInternalEdges
label nInternalEdges() const
Internal edges using 0,1 or 2 boundary points.
Definition: primitiveMeshI.H:59
Foam::primitiveMesh::hasCellCentres
bool hasCellCentres() const
Definition: primitiveMeshI.H:186
Foam::primitiveMesh::nBoundaryFaces
label nBoundaryFaces() const
Number of boundary faces (== nFaces - nInternalFaces)
Definition: primitiveMeshI.H:84
Foam::primitiveMesh::hasFaceAreas
bool hasFaceAreas() const
Definition: primitiveMeshI.H:204
Foam::primitiveMesh::hasFaceCentres
bool hasFaceCentres() const
Definition: primitiveMeshI.H:192
Foam::primitiveMesh::hasEdgeCells
bool hasEdgeCells() const
Definition: primitiveMeshI.H:126
Foam::primitiveMesh::hasPointPoints
bool hasPointPoints() const
Definition: primitiveMeshI.H:174
Foam::primitiveMesh::hasCells
bool hasCells() const
Definition: primitiveMeshI.H:138
Foam::primitiveMesh::isInternalFace
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
Definition: primitiveMeshI.H:102
Foam::primitiveMesh::nPoints
label nPoints() const
Number of mesh points.
Definition: primitiveMeshI.H:37
Foam::primitiveMesh::hasEdgeFaces
bool hasEdgeFaces() const
Definition: primitiveMeshI.H:144
Foam::primitiveMesh::hasCellShapes
bool hasCellShapes() const
Definition: primitiveMeshI.H:108
Foam::primitiveMesh::hasCellCells
bool hasCellCells() const
Definition: primitiveMeshI.H:120
Foam::primitiveMesh::hasPointCells
bool hasPointCells() const
Definition: primitiveMeshI.H:132
Foam::primitiveMesh::hasPointFaces
bool hasPointFaces() const
Definition: primitiveMeshI.H:150
Foam::primitiveMesh::nInternalPoints
label nInternalPoints() const
Points not on boundary.
Definition: primitiveMeshI.H:31
Foam::primitiveMesh::hasCellPoints
bool hasCellPoints() const
Definition: primitiveMeshI.H:180