1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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
37 #include "volFields.H"
40 #include "pointField.H"
44 #include "runTimeSelectionTables.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 /*---------------------------------------------------------------------------*\
52 Class surfaceWriter Declaration
53 \*---------------------------------------------------------------------------*/
59 //- Runtime type information
60 TypeName("surfaceWriter");
62 // Declare run-time constructor selection table
64 declareRunTimeSelectionTable
73 declareRunTimeSelectionTable
79 const dictionary& optDict
87 //- Return a reference to the selected surfaceWriter
88 static autoPtr<surfaceWriter> New(const word& writeType);
90 //- Return a reference to the selected surfaceWriter
91 // Select with extra write option
92 static autoPtr<surfaceWriter> New
94 const word& writeType,
95 const dictionary& writeOptions
106 virtual ~surfaceWriter();
111 //- True if the surface format supports geometry in a separate file.
112 // False if geometry and field must be in a single file
113 virtual bool separateGeometry()
119 //- Write single surface geometry to file.
122 const fileName& outputDir, // <case>/surface/TIME
123 const fileName& surfaceName, // name of surface
124 const pointField& points,
125 const faceList& faces,
126 const bool verbose = false
131 //- Write scalarField for a single surface to file.
132 // One value per face or vertex (isNodeValues = true)
135 const fileName& outputDir, // <case>/surface/TIME
136 const fileName& surfaceName, // name of surface
137 const pointField& points,
138 const faceList& faces,
139 const word& fieldName, // name of field
140 const Field<scalar>& values,
141 const bool isNodeValues,
142 const bool verbose = false
146 //- Write vectorField for a single surface to file.
147 // One value per face or vertex (isNodeValues = true)
150 const fileName& outputDir, // <case>/surface/TIME
151 const fileName& surfaceName, // name of surface
152 const pointField& points,
153 const faceList& faces,
154 const word& fieldName, // name of field
155 const Field<vector>& values,
156 const bool isNodeValues,
157 const bool verbose = false
161 //- Write sphericalTensorField for a single surface to file.
162 // One value per face or vertex (isNodeValues = true)
165 const fileName& outputDir, // <case>/surface/TIME
166 const fileName& surfaceName, // name of surface
167 const pointField& points,
168 const faceList& faces,
169 const word& fieldName, // name of field
170 const Field<sphericalTensor>& values,
171 const bool isNodeValues,
172 const bool verbose = false
176 //- Write symmTensorField for a single surface to file.
177 // One value per face or vertex (isNodeValues = true)
180 const fileName& outputDir, // <case>/surface/TIME
181 const fileName& surfaceName, // name of surface
182 const pointField& points,
183 const faceList& faces,
184 const word& fieldName, // name of field
185 const Field<symmTensor>& values,
186 const bool isNodeValues,
187 const bool verbose = false
191 //- Write tensorField for a single surface to file.
192 // One value per face or vertex (isNodeValues = true)
195 const fileName& outputDir, // <case>/surface/TIME
196 const fileName& surfaceName, // name of surface
197 const pointField& points,
198 const faceList& faces,
199 const word& fieldName, // name of field
200 const Field<tensor>& values,
201 const bool isNodeValues,
202 const bool verbose = false
210 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212 } // End namespace Foam
214 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
218 // ************************************************************************* //