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