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