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 
112 {
113  return bool(cellShapesPtr_);
114 }
115 
117 inline bool Foam::primitiveMesh::hasEdges() const noexcept
118 {
119  return bool(edgesPtr_);
120 }
121 
124 {
125  return bool(ccPtr_);
126 }
127 
130 {
131  return bool(ecPtr_);
132 }
133 
136 {
137  return bool(pcPtr_);
138 }
139 
141 inline bool Foam::primitiveMesh::hasCells() const noexcept
142 {
143  return bool(cfPtr_);
144 }
145 
148 {
149  return bool(efPtr_);
150 }
151 
154 {
155  return bool(pfPtr_);
156 }
157 
160 {
161  return bool(cePtr_);
162 }
163 
166 {
167  return bool(fePtr_);
168 }
169 
172 {
173  return bool(pePtr_);
174 }
175 
178 {
179  return bool(ppPtr_);
180 }
181 
184 {
185  return bool(cpPtr_);
186 }
187 
190 {
191  return bool(cellCentresPtr_);
192 }
193 
196 {
197  return bool(cellVolumesPtr_);
198 }
199 
202 {
203  return bool(faceCentresPtr_);
204 }
205 
206 
208 {
209  return bool(faceAreasPtr_);
210 }
211 
212 
213 // ************************************************************************* //
label nPoints() const noexcept
Number of mesh points.
label nFaces() const noexcept
Number of mesh faces.
bool hasCellShapes() const noexcept
bool isInternalFace(const label faceIndex) const noexcept
Return true if given face label is internal to the mesh.
label nInternal1Edges() const
Internal edges using 0 or 1 boundary point.
bool hasEdges() const noexcept
bool hasCellEdges() const noexcept
bool hasPointEdges() const noexcept
label nInternalPoints() const noexcept
Points not on boundary.
bool hasFaceCentres() const noexcept
label nInternalFaces() const noexcept
Number of internal faces.
bool hasCellCentres() const noexcept
bool hasEdgeFaces() const noexcept
bool hasEdgeCells() const noexcept
label nEdges() const
Number of mesh edges.
label nInternalEdges() const
Internal edges using 0,1 or 2 boundary points.
const direction noexcept
Definition: Scalar.H:258
bool hasCellPoints() const noexcept
bool hasPointCells() const noexcept
bool hasFaceEdges() const noexcept
bool hasFaceAreas() const noexcept
bool hasCells() const noexcept
bool hasPointFaces() const noexcept
bool hasCellVolumes() const noexcept
label nCells() const noexcept
Number of mesh cells.
bool hasPointPoints() const noexcept
bool hasCellCells() const noexcept
label nBoundaryFaces() const noexcept
Number of boundary faces (== nFaces - nInternalFaces)
label nInternal0Edges() const
Internal edges (i.e. not on boundary face) using no boundary point.