|
|
|
fieldviewTopology.HGo 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 Class 00026 Foam::fieldviewTopology 00027 00028 Description 00029 00030 SourceFiles 00031 fieldviewTopology.C 00032 00033 \*---------------------------------------------------------------------------*/ 00034 00035 #ifndef fieldviewTopology_H 00036 #define fieldviewTopology_H 00037 00038 #include "labelList.H" 00039 #include "faceList.H" 00040 00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00042 00043 namespace Foam 00044 { 00045 00046 // Forward declaration of classes 00047 class polyMesh; 00048 class cellShape; 00049 00050 /*---------------------------------------------------------------------------*\ 00051 Class fieldviewTopology Declaration 00052 \*---------------------------------------------------------------------------*/ 00053 00054 class fieldviewTopology 00055 { 00056 // Private data 00057 00058 //- Hexes in fieldview format 00059 labelList hexLabels_; 00060 00061 labelList prismLabels_; 00062 00063 labelList pyrLabels_; 00064 00065 labelList tetLabels_; 00066 00067 //- Number of non-hex/prism/pyr/tet labels 00068 label nPoly_; 00069 00070 00071 // 00072 // Patches 00073 // 00074 00075 //- Quad and tri patch faces in fv format 00076 labelListList quadFaceLabels_; 00077 00078 //- Number of polyhedral faces per patch 00079 labelList nPolyFaces_; 00080 00081 00082 // Private Member Functions 00083 00084 static labelList calcFaceAddressing 00085 ( 00086 const faceList& allFaces, // faces given faceLabels 00087 const cellShape& shape, 00088 const labelList& faces, // faceLabels for given cell 00089 const label cellI 00090 ); 00091 00092 00093 //- Disallow default bitwise copy construct 00094 fieldviewTopology(const fieldviewTopology&); 00095 00096 //- Disallow default bitwise assignment 00097 void operator=(const fieldviewTopology&); 00098 00099 00100 public: 00101 00102 // Constructors 00103 00104 //- Construct from components 00105 fieldviewTopology(const polyMesh& mesh, const bool setWallInfo); 00106 00107 00108 // Member Functions 00109 00110 // Access 00111 00112 const labelList& hexLabels() const 00113 { 00114 return hexLabels_; 00115 } 00116 00117 const labelList& prismLabels() const 00118 { 00119 return prismLabels_; 00120 } 00121 00122 const labelList& pyrLabels() const 00123 { 00124 return pyrLabels_; 00125 } 00126 00127 const labelList& tetLabels() const 00128 { 00129 return tetLabels_; 00130 } 00131 00132 label nHex() const 00133 { 00134 return hexLabels().size()/9; 00135 } 00136 00137 label nPrism() const 00138 { 00139 return prismLabels().size()/7; 00140 } 00141 00142 label nPyr() const 00143 { 00144 return pyrLabels().size()/6; 00145 } 00146 00147 label nTet() const 00148 { 00149 return tetLabels().size()/5; 00150 } 00151 00152 label nPoly() const 00153 { 00154 return nPoly_; 00155 } 00156 00157 const labelListList& quadFaceLabels() const 00158 { 00159 return quadFaceLabels_; 00160 } 00161 00162 const labelList& nPolyFaces() const 00163 { 00164 return nPolyFaces_; 00165 } 00166 }; 00167 00168 00169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00170 00171 } // End namespace Foam 00172 00173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00174 00175 #endif 00176 00177 // ************************************************************************* // |