initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / OpenFOAM / meshes / primitiveMesh / primitiveMeshI.H
blob133311b6b6d794a5b115abd5f4333e119c59a101
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
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.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Description
27 \*---------------------------------------------------------------------------*/
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31 namespace Foam
34 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
36 inline label primitiveMesh::nInternalPoints() const
38     return nInternalPoints_;
42 inline label primitiveMesh::nPoints() const
44     return nPoints_;
48 inline label primitiveMesh::nInternal0Edges() const
50     // Force edge calculation
51     (void)nEdges();
52     return nInternal0Edges_;
56 inline label primitiveMesh::nInternal1Edges() const
58     // Force edge calculation
59     (void)nEdges();
60     return nInternal1Edges_;
64 inline label primitiveMesh::nInternalEdges() const
66     // Force edge calculation
67     (void)nEdges();
68     return nInternalEdges_;
72 inline label primitiveMesh::nEdges() const
74     if (nEdges_ < 0)
75     {
76         nEdges_ = edges().size();
77     }
79     return nEdges_;
83 inline label primitiveMesh::nInternalFaces() const
85     return nInternalFaces_;
89 inline label primitiveMesh::nFaces() const
91     return nFaces_;
95 inline label primitiveMesh::nCells() const
97     return nCells_;
101 inline bool primitiveMesh::isInternalFace(const label faceIndex) const
103     return faceIndex < nInternalFaces();
107 inline bool primitiveMesh::hasCellShapes() const
109     return cellShapesPtr_;
113 inline bool primitiveMesh::hasEdges() const
115     return edgesPtr_;
119 inline bool primitiveMesh::hasCellCells() const
121     return ccPtr_;
125 inline bool primitiveMesh::hasEdgeCells() const
127     return ecPtr_;
131 inline bool primitiveMesh::hasPointCells() const
133     return pcPtr_;
137 inline bool primitiveMesh::hasCells() const
139     return cfPtr_;
143 inline bool primitiveMesh::hasEdgeFaces() const
145     return efPtr_;
149 inline bool primitiveMesh::hasPointFaces() const
151     return pfPtr_;
155 inline bool primitiveMesh::hasCellEdges() const
157     return cePtr_;
161 inline bool primitiveMesh::hasFaceEdges() const
163     return fePtr_;
167 inline bool primitiveMesh::hasPointEdges() const
169     return pePtr_;
173 inline bool primitiveMesh::hasPointPoints() const
175     return ppPtr_;
179 inline bool primitiveMesh::hasCellPoints() const
181     return cpPtr_;
185 inline bool primitiveMesh::hasCellCentres() const
187     return cellCentresPtr_;
191 inline bool primitiveMesh::hasFaceCentres() const
193     return faceCentresPtr_;
197 inline bool primitiveMesh::hasCellVolumes() const
199     return cellVolumesPtr_;
203 inline bool primitiveMesh::hasFaceAreas() const
205     return faceAreasPtr_;
209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211 } // End namespace Foam
213 // ************************************************************************* //