1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2010 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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
32 \*---------------------------------------------------------------------------*/
34 #ifndef surfaceWriter_H
35 #define surfaceWriter_H
40 #include "pointField.H"
44 #include "runTimeSelectionTables.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 // Forward declaration of friend functions and operators
53 template<class Type> class surfaceWriter;
54 template<class Type> class nullSurfaceWriter;
55 template<class Type> class proxySurfaceWriter;
57 /*---------------------------------------------------------------------------*\
58 Class surfaceWriter Declaration
59 \*---------------------------------------------------------------------------*/
64 //- friendship between writer data types
65 template<class Type2> friend class surfaceWriter;
69 //- Runtime type information
70 TypeName("surfaceWriter");
72 // Declare run-time constructor selection table
74 declareRunTimeSelectionTable
86 //- Return a reference to the selected surfaceWriter
87 static autoPtr<surfaceWriter> New(const word& writeFormat);
98 virtual ~surfaceWriter();
103 //- Return true if the surface format supports separate files
104 virtual bool separateFiles()
110 //- Writes single surface geometry to file.
113 const fileName& outputDir, // <root>/<case>/surface/TIME
114 const fileName& surfaceName, // name of surface
115 const pointField& points,
116 const faceList& faces,
117 const bool verbose = false
122 //- Writes single surface to file. Either one value per vertex or
123 // one value per face (detected by values.size()==faces.size())
126 const fileName& outputDir, // <root>/<case>/surface/TIME
127 const fileName& surfaceName, // name of surface
128 const pointField& points,
129 const faceList& faces,
130 const fileName& fieldName, // name of field
131 const Field<Type>& values,
132 const bool verbose = false
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 } // End namespace Foam
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 # include "surfaceWriter.C"
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 // ************************************************************************* //