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-2021 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 noexcept
32 {
33  return nInternalPoints_;
34 }
35 
36 
37 inline Foam::label Foam::primitiveMesh::nPoints() const noexcept
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 noexcept
79 {
80  return nInternalFaces_;
81 }
82 
83 
84 inline Foam::label Foam::primitiveMesh::nBoundaryFaces() const noexcept
85 {
86  return (nFaces_ - nInternalFaces_);
87 }
88 
89 
90 inline Foam::label Foam::primitiveMesh::nFaces() const noexcept
91 {
92  return nFaces_;
93 }
94 
95 
96 inline Foam::label Foam::primitiveMesh::nCells() const noexcept
97 {
98  return nCells_;
99 }
100 
101 
103 (
104  const label faceIndex
105 ) const noexcept
106 {
107  return faceIndex < nInternalFaces_;
108 }
109 
110 
111 inline bool Foam::primitiveMesh::hasCellShapes() const noexcept
112 {
113  return cellShapesPtr_;
114 }
115 
116 
117 inline bool Foam::primitiveMesh::hasEdges() const noexcept
118 {
119  return edgesPtr_;
120 }
121 
122 
123 inline bool Foam::primitiveMesh::hasCellCells() const noexcept
124 {
125  return ccPtr_;
126 }
127 
128 
129 inline bool Foam::primitiveMesh::hasEdgeCells() const noexcept
130 {
131  return ecPtr_;
132 }
133 
134 
135 inline bool Foam::primitiveMesh::hasPointCells() const noexcept
136 {
137  return pcPtr_;
138 }
139 
140 
141 inline bool Foam::primitiveMesh::hasCells() const noexcept
142 {
143  return cfPtr_;
144 }
145 
146 
147 inline bool Foam::primitiveMesh::hasEdgeFaces() const noexcept
148 {
149  return efPtr_;
150 }
151 
152 
153 inline bool Foam::primitiveMesh::hasPointFaces() const noexcept
154 {
155  return pfPtr_;
156 }
157 
158 
159 inline bool Foam::primitiveMesh::hasCellEdges() const noexcept
160 {
161  return cePtr_;
162 }
163 
164 
165 inline bool Foam::primitiveMesh::hasFaceEdges() const noexcept
166 {
167  return fePtr_;
168 }
169 
170 
171 inline bool Foam::primitiveMesh::hasPointEdges() const noexcept
172 {
173  return pePtr_;
174 }
175 
176 
177 inline bool Foam::primitiveMesh::hasPointPoints() const noexcept
178 {
179  return ppPtr_;
180 }
181 
182 
183 inline bool Foam::primitiveMesh::hasCellPoints() const noexcept
184 {
185  return cpPtr_;
186 }
187 
188 
189 inline bool Foam::primitiveMesh::hasCellCentres() const noexcept
190 {
191  return cellCentresPtr_;
192 }
193 
194 
195 inline bool Foam::primitiveMesh::hasFaceCentres() const noexcept
196 {
197  return faceCentresPtr_;
198 }
199 
200 
201 inline bool Foam::primitiveMesh::hasCellVolumes() const noexcept
202 {
203  return cellVolumesPtr_;
204 }
205 
206 
207 inline bool Foam::primitiveMesh::hasFaceAreas() const noexcept
208 {
209  return faceAreasPtr_;
210 }
211 
212 
213 // ************************************************************************* //
Foam::primitiveMesh::hasPointPoints
bool hasPointPoints() const noexcept
Definition: primitiveMeshI.H:177
Foam::primitiveMesh::nInternal0Edges
label nInternal0Edges() const
Definition: primitiveMeshI.H:43
Foam::primitiveMesh::hasPointFaces
bool hasPointFaces() const noexcept
Definition: primitiveMeshI.H:153
Foam::primitiveMesh::hasPointCells
bool hasPointCells() const noexcept
Definition: primitiveMeshI.H:135
Foam::primitiveMesh::hasFaceEdges
bool hasFaceEdges() const noexcept
Definition: primitiveMeshI.H:165
Foam::primitiveMesh::nEdges
label nEdges() const
Number of mesh edges.
Definition: primitiveMeshI.H:67
Foam::primitiveMesh::nInternal1Edges
label nInternal1Edges() const
Internal edges using 0 or 1 boundary point.
Definition: primitiveMeshI.H:51
Foam::primitiveMesh::hasCellVolumes
bool hasCellVolumes() const noexcept
Definition: primitiveMeshI.H:201
Foam::primitiveMesh::nPoints
label nPoints() const noexcept
Number of mesh points.
Definition: primitiveMeshI.H:37
Foam::primitiveMesh::nCells
label nCells() const noexcept
Number of mesh cells.
Definition: primitiveMeshI.H:96
Foam::primitiveMesh::nInternalPoints
label nInternalPoints() const noexcept
Points not on boundary.
Definition: primitiveMeshI.H:31
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 noexcept
Definition: primitiveMeshI.H:189
Foam::primitiveMesh::hasFaceAreas
bool hasFaceAreas() const noexcept
Definition: primitiveMeshI.H:207
Foam::primitiveMesh::nBoundaryFaces
label nBoundaryFaces() const noexcept
Number of boundary faces (== nFaces - nInternalFaces)
Definition: primitiveMeshI.H:84
Foam::primitiveMesh::hasCellCells
bool hasCellCells() const noexcept
Definition: primitiveMeshI.H:123
Foam::primitiveMesh::isInternalFace
bool isInternalFace(const label faceIndex) const noexcept
Return true if given face label is internal to the mesh.
Definition: primitiveMeshI.H:103
Foam::primitiveMesh::nInternalFaces
label nInternalFaces() const noexcept
Number of internal faces.
Definition: primitiveMeshI.H:78
Foam::primitiveMesh::hasCellShapes
bool hasCellShapes() const noexcept
Definition: primitiveMeshI.H:111
Foam::primitiveMesh::hasCellPoints
bool hasCellPoints() const noexcept
Definition: primitiveMeshI.H:183
Foam::primitiveMesh::hasCells
bool hasCells() const noexcept
Definition: primitiveMeshI.H:141
Foam::primitiveMesh::nFaces
label nFaces() const noexcept
Number of mesh faces.
Definition: primitiveMeshI.H:90
Foam::primitiveMesh::hasPointEdges
bool hasPointEdges() const noexcept
Definition: primitiveMeshI.H:171
Foam::primitiveMesh::hasCellEdges
bool hasCellEdges() const noexcept
Definition: primitiveMeshI.H:159
Foam::primitiveMesh::hasFaceCentres
bool hasFaceCentres() const noexcept
Definition: primitiveMeshI.H:195
Foam::primitiveMesh::hasEdgeCells
bool hasEdgeCells() const noexcept
Definition: primitiveMeshI.H:129
Foam::primitiveMesh::hasEdgeFaces
bool hasEdgeFaces() const noexcept
Definition: primitiveMeshI.H:147
Foam::primitiveMesh::hasEdges
bool hasEdges() const noexcept
Definition: primitiveMeshI.H:117