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/>.
25 Foam::foamFileSurfaceWriter
28 A surfaceWriter for foamFiles
31 foamFileSurfaceWriter.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef foamFileSurfaceWriter_H
36 #define foamFileSurfaceWriter_H
38 #include "surfaceWriter.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 /*---------------------------------------------------------------------------*\
46 Class foamFileSurfaceWriter Declaration
47 \*---------------------------------------------------------------------------*/
49 class foamFileSurfaceWriter
53 // Private Member Functions
55 //- Templated write operation
59 const fileName& outputDir,
60 const fileName& surfaceName,
61 const pointField& points,
62 const faceList& faces,
63 const word& fieldName,
64 const Field<Type>& values,
65 const bool isNodeValues,
72 //- Runtime type information
79 foamFileSurfaceWriter();
83 virtual ~foamFileSurfaceWriter();
88 //- True if the surface format supports geometry in a separate file.
89 // False if geometry and field must be in a single file
90 virtual bool separateGeometry()
95 //- Write single surface geometry to file.
98 const fileName& outputDir,
99 const fileName& surfaceName,
100 const pointField& points,
101 const faceList& faces,
102 const bool verbose = false
106 //- Write scalarField for a single surface to file.
107 // One value per face or vertex (isNodeValues = true)
110 const fileName& outputDir, // <case>/surface/TIME
111 const fileName& surfaceName, // name of surface
112 const pointField& points,
113 const faceList& faces,
114 const word& fieldName, // name of field
115 const Field<scalar>& values,
116 const bool isNodeValues,
117 const bool verbose = false
120 //- Write vectorField for a single surface to file.
121 // One value per face or vertex (isNodeValues = true)
124 const fileName& outputDir, // <case>/surface/TIME
125 const fileName& surfaceName, // name of surface
126 const pointField& points,
127 const faceList& faces,
128 const word& fieldName, // name of field
129 const Field<vector>& values,
130 const bool isNodeValues,
131 const bool verbose = false
134 //- Write sphericalTensorField for a single surface to file.
135 // One value per face or vertex (isNodeValues = true)
138 const fileName& outputDir, // <case>/surface/TIME
139 const fileName& surfaceName, // name of surface
140 const pointField& points,
141 const faceList& faces,
142 const word& fieldName, // name of field
143 const Field<sphericalTensor>& values,
144 const bool isNodeValues,
145 const bool verbose = false
148 //- Write symmTensorField for a single surface to file.
149 // One value per face or vertex (isNodeValues = true)
152 const fileName& outputDir, // <case>/surface/TIME
153 const fileName& surfaceName, // name of surface
154 const pointField& points,
155 const faceList& faces,
156 const word& fieldName, // name of field
157 const Field<symmTensor>& values,
158 const bool isNodeValues,
159 const bool verbose = false
162 //- Write tensorField for a single surface to file.
163 // One value per face or vertex (isNodeValues = true)
166 const fileName& outputDir, // <case>/surface/TIME
167 const fileName& surfaceName, // name of surface
168 const pointField& points,
169 const faceList& faces,
170 const word& fieldName, // name of field
171 const Field<tensor>& values,
172 const bool isNodeValues,
173 const bool verbose = false
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 } // End namespace Foam
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 // ************************************************************************* //