OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

primitiveMeshI.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Description
00026 
00027 \*---------------------------------------------------------------------------*/
00028 
00029 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00030 
00031 namespace Foam
00032 {
00033 
00034 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00035 
00036 inline label primitiveMesh::nInternalPoints() const
00037 {
00038     return nInternalPoints_;
00039 }
00040 
00041 
00042 inline label primitiveMesh::nPoints() const
00043 {
00044     return nPoints_;
00045 }
00046 
00047 
00048 inline label primitiveMesh::nInternal0Edges() const
00049 {
00050     // Force edge calculation
00051     (void)nEdges();
00052     return nInternal0Edges_;
00053 }
00054 
00055 
00056 inline label primitiveMesh::nInternal1Edges() const
00057 {
00058     // Force edge calculation
00059     (void)nEdges();
00060     return nInternal1Edges_;
00061 }
00062 
00063 
00064 inline label primitiveMesh::nInternalEdges() const
00065 {
00066     // Force edge calculation
00067     (void)nEdges();
00068     return nInternalEdges_;
00069 }
00070 
00071 
00072 inline label primitiveMesh::nEdges() const
00073 {
00074     if (nEdges_ < 0)
00075     {
00076         nEdges_ = edges().size();
00077     }
00078 
00079     return nEdges_;
00080 }
00081 
00082 
00083 inline label primitiveMesh::nInternalFaces() const
00084 {
00085     return nInternalFaces_;
00086 }
00087 
00088 
00089 inline label primitiveMesh::nFaces() const
00090 {
00091     return nFaces_;
00092 }
00093 
00094 
00095 inline label primitiveMesh::nCells() const
00096 {
00097     return nCells_;
00098 }
00099 
00100 
00101 inline bool primitiveMesh::isInternalFace(const label faceIndex) const
00102 {
00103     return faceIndex < nInternalFaces();
00104 }
00105 
00106 
00107 inline bool primitiveMesh::hasCellShapes() const
00108 {
00109     return cellShapesPtr_;
00110 }
00111 
00112 
00113 inline bool primitiveMesh::hasEdges() const
00114 {
00115     return edgesPtr_;
00116 }
00117 
00118 
00119 inline bool primitiveMesh::hasCellCells() const
00120 {
00121     return ccPtr_;
00122 }
00123 
00124 
00125 inline bool primitiveMesh::hasEdgeCells() const
00126 {
00127     return ecPtr_;
00128 }
00129 
00130 
00131 inline bool primitiveMesh::hasPointCells() const
00132 {
00133     return pcPtr_;
00134 }
00135 
00136 
00137 inline bool primitiveMesh::hasCells() const
00138 {
00139     return cfPtr_;
00140 }
00141 
00142 
00143 inline bool primitiveMesh::hasEdgeFaces() const
00144 {
00145     return efPtr_;
00146 }
00147 
00148 
00149 inline bool primitiveMesh::hasPointFaces() const
00150 {
00151     return pfPtr_;
00152 }
00153 
00154 
00155 inline bool primitiveMesh::hasCellEdges() const
00156 {
00157     return cePtr_;
00158 }
00159 
00160 
00161 inline bool primitiveMesh::hasFaceEdges() const
00162 {
00163     return fePtr_;
00164 }
00165 
00166 
00167 inline bool primitiveMesh::hasPointEdges() const
00168 {
00169     return pePtr_;
00170 }
00171 
00172 
00173 inline bool primitiveMesh::hasPointPoints() const
00174 {
00175     return ppPtr_;
00176 }
00177 
00178 
00179 inline bool primitiveMesh::hasCellPoints() const
00180 {
00181     return cpPtr_;
00182 }
00183 
00184 
00185 inline bool primitiveMesh::hasCellCentres() const
00186 {
00187     return cellCentresPtr_;
00188 }
00189 
00190 
00191 inline bool primitiveMesh::hasFaceCentres() const
00192 {
00193     return faceCentresPtr_;
00194 }
00195 
00196 
00197 inline bool primitiveMesh::hasCellVolumes() const
00198 {
00199     return cellVolumesPtr_;
00200 }
00201 
00202 
00203 inline bool primitiveMesh::hasFaceAreas() const
00204 {
00205     return faceAreasPtr_;
00206 }
00207 
00208 
00209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00210 
00211 } // End namespace Foam
00212 
00213 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd