|
|
|
TRIsurfaceFormatCore.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::fileFormats::TRIsurfaceFormatCore 00027 00028 Description 00029 Internal class used by the TRIsurfaceFormat 00030 00031 SourceFiles 00032 TRIsurfaceFormatCore.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef TRIsurfaceFormatCore_H 00037 #define TRIsurfaceFormatCore_H 00038 00039 #include "surfaceFormatsCore.H" 00040 #include "triFace.H" 00041 00042 #include "IFstream.H" 00043 #include "Ostream.H" 00044 #include "OFstream.H" 00045 00046 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00047 00048 namespace Foam 00049 { 00050 namespace fileFormats 00051 { 00052 00053 /*---------------------------------------------------------------------------*\ 00054 Class TRIsurfaceFormatCore Declaration 00055 \*---------------------------------------------------------------------------*/ 00056 00057 class TRIsurfaceFormatCore 00058 : 00059 public surfaceFormatsCore 00060 { 00061 // Private Data 00062 00063 bool sorted_; 00064 00065 //- The points supporting the facets 00066 pointField points_; 00067 00068 //- The zones associated with the faces 00069 List<label> zoneIds_; 00070 00071 //- The solid count, in the order of their first appearance 00072 List<label> sizes_; 00073 00074 00075 // Private Member Functions 00076 00077 //- Disallow default bitwise copy construct 00078 TRIsurfaceFormatCore(const TRIsurfaceFormatCore&); 00079 00080 //- Disallow default bitwise assignment 00081 void operator=(const TRIsurfaceFormatCore&); 00082 00083 bool read(const fileName&); 00084 00085 00086 public: 00087 00088 // Constructors 00089 00090 //- Read from file, filling in the information 00091 TRIsurfaceFormatCore(const fileName&); 00092 00093 00094 // Destructor 00095 00096 ~TRIsurfaceFormatCore(); 00097 00098 00099 // Member Functions 00100 00101 //- File read was already sorted 00102 bool sorted() const 00103 { 00104 return sorted_; 00105 } 00106 00107 //- Flush all values 00108 void clear() 00109 { 00110 sorted_ = true; 00111 points_.clear(); 00112 zoneIds_.clear(); 00113 sizes_.clear(); 00114 } 00115 00116 //- Return full access to the points 00117 pointField& points() 00118 { 00119 return points_; 00120 } 00121 00122 //- Return full access to the zones 00123 List<label>& zoneIds() 00124 { 00125 return zoneIds_; 00126 } 00127 00128 //- The list of zone sizes in the order of their first appearance 00129 List<label>& sizes() 00130 { 00131 return sizes_; 00132 } 00133 }; 00134 00135 00136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00137 00138 } // End namespace fileFormats 00139 } // End namespace Foam 00140 00141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00142 00143 #endif 00144 00145 // ************************************************************************* // |