initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / surfMesh / surfaceFormats / vtk / VTKsurfaceFormat.H
blobffd9349b431b3e1a6122a2f179ddaebaac639ee8
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software; you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::fileFormats::VTKsurfaceFormat
28 Description
29     Provide a means of writing VTK legacy format.
30     The output is never sorted by zone.
32 SourceFiles
33     VTKsurfaceFormat.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef VTKsurfaceFormat_H
38 #define VTKsurfaceFormat_H
40 #include "MeshedSurface.H"
41 #include "MeshedSurfaceProxy.H"
42 #include "UnsortedMeshedSurface.H"
43 #include "VTKsurfaceFormatCore.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 namespace Foam
49 namespace fileFormats
52 /*---------------------------------------------------------------------------*\
53                      Class VTKsurfaceFormat Declaration
54 \*---------------------------------------------------------------------------*/
56 template<class Face>
57 class VTKsurfaceFormat
59     public MeshedSurface<Face>,
60     public VTKsurfaceFormatCore
62     // Private Member Functions
64         //- Write header information about number of polygon points
65         static void writeHeaderPolygons(Ostream&, const UList<Face>&);
67         //- Disallow default bitwise copy construct
68         VTKsurfaceFormat(const VTKsurfaceFormat<Face>&);
70         //- Disallow default bitwise assignment
71         void operator=(const VTKsurfaceFormat<Face>&);
74 public:
76     // Constructors
78         //- Construct null
79         VTKsurfaceFormat();
82     // Destructor
84         virtual ~VTKsurfaceFormat()
85         {}
88     // Member Functions
90         // Write
92             //- Write surface mesh components by proxy
93             static void write
94             (
95                 const fileName&, const MeshedSurfaceProxy<Face>&
96             );
98             //- Write UnsortedMeshedSurface, the output remains unsorted
99             static void write
100             (
101                 const fileName&, const UnsortedMeshedSurface<Face>&
102             );
105             //- Write object
106             virtual void write(Ostream& os) const
107             {
108                 write(os, MeshedSurfaceProxy<Face>(*this));
109             }
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 } // End namespace fileFormats
116 } // End namespace Foam
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 #ifdef NoRepository
121 #   include "VTKsurfaceFormat.C"
122 #endif
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 #endif
128 // ************************************************************************* //