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) 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 Description
25 
26 \*---------------------------------------------------------------------------*/
27 
28 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
29 
30 namespace Foam
31 {
32 
33 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
34 
36 {
37  return nInternalPoints_;
38 }
39 
40 
41 inline label primitiveMesh::nPoints() const
42 {
43  return nPoints_;
44 }
45 
46 
48 {
49  // Force edge calculation
50  (void)nEdges();
51  return nInternal0Edges_;
52 }
53 
54 
56 {
57  // Force edge calculation
58  (void)nEdges();
59  return nInternal1Edges_;
60 }
61 
62 
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 
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 // ************************************************************************* //
Foam::primitiveMesh::fePtr_
labelListList * fePtr_
Face-edges.
Definition: primitiveMesh.H:137
Foam::primitiveMesh::nCells_
label nCells_
Number of cells.
Definition: primitiveMesh.H:98
Foam::primitiveMesh::pePtr_
labelListList * pePtr_
Point-edges.
Definition: primitiveMesh.H:140
Foam::primitiveMesh::hasPointEdges
bool hasPointEdges() const
Definition: primitiveMeshI.H:136
Foam::primitiveMesh::nInternal1Edges_
label nInternal1Edges_
Number of internal edges using 0 or 1 boundary points.
Definition: primitiveMesh.H:90
Foam::primitiveMesh::nInternalEdges
label nInternalEdges() const
Internal edges using 0,1 or 2 boundary points.
Definition: primitiveMeshI.H:63
Foam::primitiveMesh::ppPtr_
labelListList * ppPtr_
Point-points.
Definition: primitiveMesh.H:143
Foam::primitiveMesh::nInternal0Edges
label nInternal0Edges() const
Internal edges (i.e. not on boundary face) using.
Definition: primitiveMeshI.H:47
Foam::primitiveMesh::ecPtr_
labelListList * ecPtr_
Edge-cells.
Definition: primitiveMesh.H:119
Foam::primitiveMesh::hasCellVolumes
bool hasCellVolumes() const
Definition: primitiveMeshI.H:166
Foam::primitiveMesh::hasEdges
bool hasEdges() const
Definition: primitiveMeshI.H:82
Foam::primitiveMesh::cellVolumesPtr_
scalarField * cellVolumesPtr_
Cell volumes.
Definition: primitiveMesh.H:167
Foam::primitiveMesh::hasCellEdges
bool hasCellEdges() const
Definition: primitiveMeshI.H:124
Foam::primitiveMesh::edges
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
Definition: primitiveMeshEdges.C:353
Foam::primitiveMesh::pfPtr_
labelListList * pfPtr_
Point-faces.
Definition: primitiveMesh.H:131
Foam::primitiveMesh::nEdges
label nEdges() const
Definition: primitiveMeshI.H:41
Foam::primitiveMesh::nEdges_
label nEdges_
Number of edges.
Definition: primitiveMesh.H:89
Foam::primitiveMesh::nInternal0Edges_
label nInternal0Edges_
Number of internal edges using 0 boundary points.
Definition: primitiveMesh.H:87
Foam::primitiveMesh::hasFaceEdges
bool hasFaceEdges() const
Definition: primitiveMeshI.H:130
Foam::primitiveMesh::nCells
label nCells() const
Definition: primitiveMeshI.H:64
Foam::primitiveMesh::nPoints
label nPoints() const
Definition: primitiveMeshI.H:35
Foam::label
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
Foam::primitiveMesh::hasCellCentres
bool hasCellCentres() const
Definition: primitiveMeshI.H:154
Foam::primitiveMesh::nInternalFaces_
label nInternalFaces_
Number of internal faces.
Definition: primitiveMesh.H:92
Foam::primitiveMesh::faceCentresPtr_
vectorField * faceCentresPtr_
Face centres.
Definition: primitiveMesh.H:164
Foam::primitiveMesh::pcPtr_
labelListList * pcPtr_
Point-cells.
Definition: primitiveMesh.H:122
Foam::primitiveMesh::cfPtr_
cellList * cfPtr_
Cell-faces.
Definition: primitiveMesh.H:125
Foam::primitiveMesh::cellShapesPtr_
cellShapeList * cellShapesPtr_
Cell shapes.
Definition: primitiveMesh.H:104
Foam::primitiveMesh::ccPtr_
labelListList * ccPtr_
Cell-cells.
Definition: primitiveMesh.H:116
Foam::primitiveMesh::nInternalFaces
label nInternalFaces() const
Definition: primitiveMeshI.H:52
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::primitiveMesh::nInternalPoints
label nInternalPoints() const
Points not on boundary.
Definition: primitiveMeshI.H:35
Foam::primitiveMesh::nInternal1Edges
label nInternal1Edges() const
Internal edges using 0 or 1 boundary point.
Definition: primitiveMeshI.H:55
Foam::primitiveMesh::hasFaceAreas
bool hasFaceAreas() const
Definition: primitiveMeshI.H:172
Foam::primitiveMesh::hasFaceCentres
bool hasFaceCentres() const
Definition: primitiveMeshI.H:160
Foam::primitiveMesh::hasEdgeCells
bool hasEdgeCells() const
Definition: primitiveMeshI.H:94
Foam::primitiveMesh::hasPointPoints
bool hasPointPoints() const
Definition: primitiveMeshI.H:142
Foam::primitiveMesh::cpPtr_
labelListList * cpPtr_
Cell-points.
Definition: primitiveMesh.H:146
Foam::primitiveMesh::nFaces
label nFaces() const
Definition: primitiveMeshI.H:58
Foam::primitiveMesh::hasCells
bool hasCells() const
Definition: primitiveMeshI.H:106
Foam::primitiveMesh::nPoints_
label nPoints_
Number of points.
Definition: primitiveMesh.H:86
Foam::primitiveMesh::faceAreasPtr_
vectorField * faceAreasPtr_
Face areas.
Definition: primitiveMesh.H:170
Foam::primitiveMesh::cePtr_
labelListList * cePtr_
Cell-edges.
Definition: primitiveMesh.H:134
Foam::primitiveMesh::efPtr_
labelListList * efPtr_
Edge-faces.
Definition: primitiveMesh.H:128
Foam::primitiveMesh::isInternalFace
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
Definition: primitiveMeshI.H:70
Foam::primitiveMesh::edgesPtr_
edgeList * edgesPtr_
Edges are ordered in upper triangular order.
Definition: primitiveMesh.H:110
Foam::primitiveMesh::hasEdgeFaces
bool hasEdgeFaces() const
Definition: primitiveMeshI.H:112
Foam::primitiveMesh::hasCellShapes
bool hasCellShapes() const
Definition: primitiveMeshI.H:76
Foam::primitiveMesh::nFaces_
label nFaces_
Number of faces.
Definition: primitiveMesh.H:95
Foam::primitiveMesh::nInternalEdges_
label nInternalEdges_
Number of internal edges using 0,1 or 2boundary points.
Definition: primitiveMesh.H:93
Foam::primitiveMesh::hasCellCells
bool hasCellCells() const
Definition: primitiveMeshI.H:88
Foam::primitiveMesh::cellCentresPtr_
vectorField * cellCentresPtr_
Cell centres.
Definition: primitiveMesh.H:161
Foam::primitiveMesh::hasPointCells
bool hasPointCells() const
Definition: primitiveMeshI.H:100
Foam::List::size
void size(const label)
Override size to be inconsistent with allocated storage.
Foam::primitiveMesh::hasPointFaces
bool hasPointFaces() const
Definition: primitiveMeshI.H:118
Foam::primitiveMesh::nInternalPoints_
label nInternalPoints_
Number of internal points (or -1 if points not sorted)
Definition: primitiveMesh.H:81
Foam::primitiveMesh::hasCellPoints
bool hasCellPoints() const
Definition: primitiveMeshI.H:148