primitiveMeshI.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | foam-extend: Open Source CFD
4  \\ / O peration | Version: 3.2
5  \\ / A nd | Web: http://www.foam-extend.org
6  \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9  This file is part of foam-extend.
10 
11  foam-extend is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by the
13  Free Software Foundation, either version 3 of the License, or (at your
14  option) any later version.
15 
16  foam-extend is distributed in the hope that it will be useful, but
17  WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with foam-extend. 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 nPoints_;
38 }
39 
40 
42 {
43  if (nEdges_ < 0)
44  {
45  nEdges_ = edges().size();
46  }
47 
48  return nEdges_;
49 }
50 
51 
53 {
54  return nInternalFaces_;
55 }
56 
57 
59 {
60  return nFaces_;
61 }
62 
63 
65 {
66  return nCells_;
67 }
68 
69 
70 inline bool primitiveMesh::isInternalFace(const label faceIndex) const
71 {
72  return faceIndex < nInternalFaces();
73 }
74 
75 
76 inline bool primitiveMesh::hasCellShapes() const
77 {
78  return cellShapesPtr_;
79 }
80 
81 
82 inline bool primitiveMesh::hasEdges() const
83 {
84  return edgesPtr_;
85 }
86 
87 
88 inline bool primitiveMesh::hasCellCells() const
89 {
90  return ccPtr_;
91 }
92 
93 
94 inline bool primitiveMesh::hasEdgeCells() const
95 {
96  return ecPtr_;
97 }
98 
99 
100 inline bool primitiveMesh::hasPointCells() const
101 {
102  return pcPtr_;
103 }
104 
105 
106 inline bool primitiveMesh::hasCells() const
107 {
108  return cfPtr_;
109 }
110 
111 
112 inline bool primitiveMesh::hasEdgeFaces() const
113 {
114  return efPtr_;
115 }
116 
117 
118 inline bool primitiveMesh::hasPointFaces() const
119 {
120  return pfPtr_;
121 }
122 
123 
124 inline bool primitiveMesh::hasCellEdges() const
125 {
126  return cePtr_;
127 }
128 
129 
130 inline bool primitiveMesh::hasFaceEdges() const
131 {
132  return fePtr_;
133 }
134 
135 
136 inline bool primitiveMesh::hasPointEdges() const
137 {
138  return pePtr_;
139 }
140 
141 
142 inline bool primitiveMesh::hasPointPoints() const
143 {
144  return ppPtr_;
145 }
146 
147 
148 inline bool primitiveMesh::hasCellPoints() const
149 {
150  return cpPtr_;
151 }
152 
153 
154 inline bool primitiveMesh::hasCellCentres() const
155 {
156  return cellCentresPtr_;
157 }
158 
159 
160 inline bool primitiveMesh::hasFaceCentres() const
161 {
162  return faceCentresPtr_;
163 }
164 
165 
166 inline bool primitiveMesh::hasCellVolumes() const
167 {
168  return cellVolumesPtr_;
169 }
170 
171 
172 inline bool primitiveMesh::hasFaceAreas() const
173 {
174  return faceAreasPtr_;
175 }
176 
177 
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 
180 } // End namespace Foam
181 
182 // ************************************************************************* //
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::ppPtr_
labelListList * ppPtr_
Point-points.
Definition: primitiveMesh.H:143
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::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::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::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::hasCellPoints
bool hasCellPoints() const
Definition: primitiveMeshI.H:148