|
|
|
ensightPartCells.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::ensightPartCells 00027 00028 Description 00029 An implementation of ensightPart to hold volume mesh cells. 00030 00031 SourceFiles 00032 ensightPartCells.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef ensightPartCells_H 00037 #define ensightPartCells_H 00038 00039 #include "ensightPart.H" 00040 #include "typeInfo.H" 00041 00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00043 00044 namespace Foam 00045 { 00046 00047 /*---------------------------------------------------------------------------*\ 00048 Class ensightPartCells Declaration 00049 \*---------------------------------------------------------------------------*/ 00050 00051 class ensightPartCells 00052 : 00053 public ensightPart 00054 { 00055 // Private Member Functions 00056 00057 //- Disallow default bitwise assignment 00058 void operator=(const ensightPartCells&); 00059 00060 //- classify the cell types 00061 void classify(const labelList& idLabels = labelList::null()); 00062 00063 //- track points used 00064 virtual localPoints calcLocalPoints() const; 00065 00066 //- track the points used 00067 // virtual void makeLocalPointMap(); 00068 00069 //- element connectivity 00070 virtual void writeConnectivity 00071 ( 00072 ensightGeoFile& os, 00073 const string& key, 00074 const labelList& idList, 00075 const labelList& pointMap 00076 ) const; 00077 00078 00079 protected: 00080 00081 //- addressable Ensight element types 00082 enum elemType 00083 { 00084 tetra4Elements, 00085 pyramid5Elements, 00086 penta6Elements, 00087 hexa8Elements, 00088 nfacedElements 00089 }; 00090 00091 // Static data members 00092 static List<word> elemTypes_; 00093 00094 00095 public: 00096 00097 //- Runtime type information 00098 TypeName("ensightCells"); 00099 00100 // Constructors 00101 00102 //- Construct empty part with number and description 00103 ensightPartCells(label partNumber, const string& partDescription); 00104 00105 //- Construct from polyMesh without zones 00106 ensightPartCells(label partNumber, const polyMesh&); 00107 00108 //- Construct from polyMesh and list of (non-zoned) cells 00109 ensightPartCells 00110 ( 00111 label partNumber, 00112 const polyMesh&, 00113 const labelList& 00114 ); 00115 00116 //- Construct from polyMesh and cellZone 00117 ensightPartCells 00118 ( 00119 label partNumber, 00120 const polyMesh&, 00121 const cellZone& 00122 ); 00123 00124 //- Construct as copy 00125 ensightPartCells(const ensightPartCells&); 00126 00127 //- Construct from Istream 00128 ensightPartCells(Istream&); 00129 00130 //- Construct on freestore from Istream 00131 static autoPtr<ensightPartCells> New(Istream& is) 00132 { 00133 return autoPtr<ensightPartCells>(new ensightPartCells(is)); 00134 } 00135 00136 00137 //- Destructor 00138 virtual ~ensightPartCells(); 00139 00140 00141 // Member Functions 00142 00143 //- static listing of the element types 00144 virtual List<word> const& elementTypes() const 00145 { 00146 return elemTypes_; 00147 } 00148 }; 00149 00150 00151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00152 00153 } // End namespace Foam 00154 00155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00156 00157 #endif 00158 00159 // ************************************************************************* // |