|
|
|
GTSsurfaceFormat.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::GTSsurfaceFormat 00027 00028 Description 00029 Provide a means of reading/writing GTS format. 00030 The output is never sorted by zone and is only written if it consists 00031 entirely of triangles. 00032 00033 SourceFiles 00034 GTSsurfaceFormat.C 00035 00036 \*---------------------------------------------------------------------------*/ 00037 00038 #ifndef GTSsurfaceFormat_H 00039 #define GTSsurfaceFormat_H 00040 00041 #include "MeshedSurface.H" 00042 #include "MeshedSurfaceProxy.H" 00043 #include "UnsortedMeshedSurface.H" 00044 00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00046 00047 namespace Foam 00048 { 00049 namespace fileFormats 00050 { 00051 00052 /*---------------------------------------------------------------------------*\ 00053 Class GTSsurfaceFormat Declaration 00054 \*---------------------------------------------------------------------------*/ 00055 00056 template<class Face> 00057 class GTSsurfaceFormat 00058 : 00059 public UnsortedMeshedSurface<Face> 00060 { 00061 // Private Member Functions 00062 00063 //- Disallow default bitwise copy construct 00064 GTSsurfaceFormat(const GTSsurfaceFormat<Face>&); 00065 00066 //- Disallow default bitwise assignment 00067 void operator=(const GTSsurfaceFormat<Face>&); 00068 00069 00070 public: 00071 00072 // Constructors 00073 00074 //- Construct from file name 00075 GTSsurfaceFormat(const fileName&); 00076 00077 00078 // Selectors 00079 00080 //- Read file and return surface 00081 static autoPtr<UnsortedMeshedSurface<Face> > New(const fileName& name) 00082 { 00083 return autoPtr<UnsortedMeshedSurface<Face> > 00084 ( 00085 new GTSsurfaceFormat<Face>(name) 00086 ); 00087 } 00088 00089 00090 //- Destructor 00091 virtual ~GTSsurfaceFormat() 00092 {} 00093 00094 00095 // Member Functions 00096 00097 //- Write MeshedSurface 00098 static void write(const fileName&, const MeshedSurface<Face>&); 00099 00100 //- Write UnsortedMeshedSurface, the output remains unsorted 00101 static void write(const fileName&, const UnsortedMeshedSurface<Face>&); 00102 00103 //- Read from file 00104 virtual bool read(const fileName&); 00105 00106 //- Write object 00107 virtual void write(const fileName& name) const 00108 { 00109 write(name, *this); 00110 } 00111 }; 00112 00113 00114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00115 00116 } // End namespace fileFormats 00117 } // End namespace Foam 00118 00119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00120 00121 #ifdef NoRepository 00122 # include "GTSsurfaceFormat.C" 00123 #endif 00124 00125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00126 00127 #endif 00128 00129 // ************************************************************************* // |