Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
11License
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 * * * * * * * * * * * * * //
31inline Foam::label Foam::primitiveMesh::nInternalPoints() const noexcept
32{
33 return nInternalPoints_;
34}
35
37inline Foam::label Foam::primitiveMesh::nPoints() const noexcept
38{
39 return nPoints_;
40}
41
42
43inline Foam::label Foam::primitiveMesh::nInternal0Edges() const
45 // Force edge calculation
46 (void)nEdges();
47 return nInternal0Edges_;
48}
49
50
51inline Foam::label Foam::primitiveMesh::nInternal1Edges() const
53 // Force edge calculation
54 (void)nEdges();
55 return nInternal1Edges_;
56}
57
58
59inline Foam::label Foam::primitiveMesh::nInternalEdges() const
61 // Force edge calculation
62 (void)nEdges();
63 return nInternalEdges_;
64}
65
66
67inline Foam::label Foam::primitiveMesh::nEdges() const
68{
69 if (nEdges_ < 0)
70 {
71 nEdges_ = edges().size();
72 }
73
74 return nEdges_;
75}
76
78inline Foam::label Foam::primitiveMesh::nInternalFaces() const noexcept
79{
80 return nInternalFaces_;
81}
82
84inline Foam::label Foam::primitiveMesh::nBoundaryFaces() const noexcept
85{
86 return (nFaces_ - nInternalFaces_);
87}
88
90inline Foam::label Foam::primitiveMesh::nFaces() const noexcept
91{
92 return nFaces_;
93}
94
96inline 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
117inline 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
141inline 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// ************************************************************************* //
bool hasPointCells() const noexcept
bool isInternalFace(const label faceIndex) const noexcept
Return true if given face label is internal to the mesh.
bool hasPointPoints() const noexcept
label nInternal1Edges() const
Internal edges using 0 or 1 boundary point.
label nBoundaryFaces() const noexcept
Number of boundary faces (== nFaces - nInternalFaces).
bool hasCellCells() const noexcept
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
label nInternalEdges() const
Internal edges using 0,1 or 2 boundary points.
bool hasFaceAreas() const noexcept
bool hasCellEdges() const noexcept
label nInternalFaces() const noexcept
Number of internal faces.
bool hasEdgeFaces() const noexcept
bool hasEdgeCells() const noexcept
bool hasCellVolumes() const noexcept
bool hasCellCentres() const noexcept
bool hasPointFaces() const noexcept
bool hasCells() const noexcept
bool hasCellShapes() const noexcept
bool hasFaceCentres() const noexcept
bool hasEdges() const noexcept
label nPoints() const noexcept
Number of mesh points.
bool hasPointEdges() const noexcept
label nInternalPoints() const noexcept
Points not on boundary.
label nCells() const noexcept
Number of mesh cells.
label nFaces() const noexcept
Number of mesh faces.
bool hasCellPoints() const noexcept
bool hasFaceEdges() const noexcept
label nEdges() const
Number of mesh edges.
label nInternal0Edges() const
Internal edges (i.e. not on boundary face) using no boundary point.
const direction noexcept
Definition scalarImpl.H:265