|
|
|
ensightParts.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::ensightParts 00027 00028 Description 00029 A collection of several ensightPart elements 00030 00031 SourceFiles 00032 ensightParts.C 00033 ensightPartsI.H 00034 00035 \*---------------------------------------------------------------------------*/ 00036 00037 #ifndef ensightParts_H 00038 #define ensightParts_H 00039 00040 #include "ensightPart.H" 00041 #include "ensightPartFaces.H" 00042 #include "ensightPartCells.H" 00043 #include "volFields.H" 00044 00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00046 00047 namespace Foam 00048 { 00049 00050 /*---------------------------------------------------------------------------*\ 00051 Class ensightParts Declaration 00052 \*---------------------------------------------------------------------------*/ 00053 00054 class ensightParts 00055 { 00056 // Private Data 00057 00058 //- list of parts 00059 PtrList<ensightPart> partsList_; 00060 00061 // Private Member Functions 00062 00063 //- Disallow default bitwise copy construct 00064 ensightParts(const ensightParts&); 00065 00066 //- Disallow default bitwise assignment 00067 void operator=(const ensightParts&); 00068 00069 00070 public: 00071 00072 // Constructors 00073 00074 //- Construct from polyMesh 00075 ensightParts(const polyMesh&); 00076 00077 //- Construct from IOobject 00078 ensightParts(const IOobject&); 00079 00080 00081 //- Destructor 00082 ~ensightParts(); 00083 00084 00085 // Member functions 00086 00087 //- clear old information and construct anew from polyMesh 00088 void recalculate(const polyMesh&); 00089 00090 //- renumber elements 00091 void renumber 00092 ( 00093 const labelList& origCellId, 00094 const labelList& origFaceId 00095 ); 00096 00097 //- number of parts 00098 label size() const 00099 { 00100 return partsList_.size(); 00101 } 00102 00103 //- write the geometry 00104 void writeGeometry(ensightGeoFile&) const; 00105 00106 //- write summary information about the objects 00107 bool writeSummary(Ostream&) const; 00108 00109 //- write the lists 00110 void writeData(Ostream&) const; 00111 00112 //- write scalar field 00113 void writeScalarField 00114 ( 00115 ensightFile&, 00116 const List<scalar>& field, 00117 bool useFaceData = false 00118 ) const; 00119 00120 //- write vector field components 00121 void writeVectorField 00122 ( 00123 ensightFile&, 00124 const List<scalar>& field0, 00125 const List<scalar>& field1, 00126 const List<scalar>& field2, 00127 bool useFaceData = false 00128 ) const; 00129 00130 00131 //- write generalized field components 00132 template <class Type> 00133 void writeField 00134 ( 00135 ensightFile&, 00136 const GeometricField<Type, fvPatchField, volMesh>& 00137 ) const; 00138 00139 00140 // Friend Operators 00141 00142 friend ensightGeoFile& operator<< 00143 ( 00144 ensightGeoFile&, 00145 const ensightParts& 00146 ); 00147 }; 00148 00149 00150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00151 00152 } // End namespace Foam 00153 00154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00155 00156 #ifdef NoRepository 00157 # include "ensightPartsI.H" 00158 #endif 00159 00160 #endif 00161 00162 // ************************************************************************* // |