1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
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
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
33 \*---------------------------------------------------------------------------*/
35 #ifndef surfaceWriter_H
36 #define surfaceWriter_H
41 #include "pointField.H"
45 #include "runTimeSelectionTables.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 // Forward declaration of friend functions and operators
54 template<class Type> class surfaceWriter;
55 template<class Type> class nullSurfaceWriter;
56 template<class Type> class proxySurfaceWriter;
58 /*---------------------------------------------------------------------------*\
59 Class surfaceWriter Declaration
60 \*---------------------------------------------------------------------------*/
65 //- friendship between writer data types
66 template<class Type2> friend class surfaceWriter;
70 //- Runtime type information
71 TypeName("surfaceWriter");
73 // Declare run-time constructor selection table
75 declareRunTimeSelectionTable
87 //- Return a reference to the selected surfaceWriter
88 static autoPtr<surfaceWriter> New(const word& writeFormat);
99 virtual ~surfaceWriter();
104 //- Return true if the surface format supports separate files
105 virtual bool separateFiles()
111 //- Writes single surface geometry to file.
114 const fileName& outputDir, // <root>/<case>/surface/TIME
115 const fileName& surfaceName, // name of surface
116 const pointField& points,
117 const faceList& faces,
118 const bool verbose = false
123 //- Writes single surface to file. Either one value per vertex or
124 // one value per face (detected by values.size()==faces.size())
127 const fileName& outputDir, // <root>/<case>/surface/TIME
128 const fileName& surfaceName, // name of surface
129 const pointField& points,
130 const faceList& faces,
131 const fileName& fieldName, // name of field
132 const Field<Type>& values,
133 const bool verbose = false
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 } // End namespace Foam
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 # include "surfaceWriter.C"
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 // ************************************************************************* //