1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2010-2011 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/>.
25 Foam::ensightSurfaceWriter
28 A surfaceWriter for Ensight format.
31 ensightSurfaceWriter.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef ensightSurfaceWriter_H
36 #define ensightSurfaceWriter_H
38 #include "surfaceWriter.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 /*---------------------------------------------------------------------------*\
46 Class ensightSurfaceWriter Declaration
47 \*---------------------------------------------------------------------------*/
49 class ensightSurfaceWriter
55 //- Write option (default is IOstream::ASCII
56 IOstream::streamFormat writeFormat_;
59 // Private Member Functions
61 //- Templated write operation
65 const fileName& outputDir,
66 const fileName& surfaceName,
67 const pointField& points,
68 const faceList& faces,
69 const word& fieldName,
70 const Field<Type>& values,
71 const bool isNodeValues,
78 //- Runtime type information
85 ensightSurfaceWriter();
87 //- Construct with some output options
88 ensightSurfaceWriter(const dictionary& options);
92 virtual ~ensightSurfaceWriter();
97 //- True if the surface format supports geometry in a separate file.
98 // False if geometry and field must be in a single file
99 virtual bool separateGeometry()
105 //- Write single surface geometry to file.
108 const fileName& outputDir,
109 const fileName& surfaceName,
110 const pointField& points,
111 const faceList& faces,
112 const bool verbose = false
116 //- Write scalarField for a single surface to file.
117 // One value per face or vertex (isNodeValues = true)
120 const fileName& outputDir, // <case>/surface/TIME
121 const fileName& surfaceName, // name of surface
122 const pointField& points,
123 const faceList& faces,
124 const word& fieldName, // name of field
125 const Field<scalar>& values,
126 const bool isNodeValues,
127 const bool verbose = false
130 //- Write vectorField for a single surface to file.
131 // One value per face or vertex (isNodeValues = true)
134 const fileName& outputDir, // <case>/surface/TIME
135 const fileName& surfaceName, // name of surface
136 const pointField& points,
137 const faceList& faces,
138 const word& fieldName, // name of field
139 const Field<vector>& values,
140 const bool isNodeValues,
141 const bool verbose = false
144 //- Write sphericalTensorField for a single surface to file.
145 // One value per face or vertex (isNodeValues = true)
148 const fileName& outputDir, // <case>/surface/TIME
149 const fileName& surfaceName, // name of surface
150 const pointField& points,
151 const faceList& faces,
152 const word& fieldName, // name of field
153 const Field<sphericalTensor>& values,
154 const bool isNodeValues,
155 const bool verbose = false
158 //- Write symmTensorField for a single surface to file.
159 // One value per face or vertex (isNodeValues = true)
162 const fileName& outputDir, // <case>/surface/TIME
163 const fileName& surfaceName, // name of surface
164 const pointField& points,
165 const faceList& faces,
166 const word& fieldName, // name of field
167 const Field<symmTensor>& values,
168 const bool isNodeValues,
169 const bool verbose = false
172 //- Write tensorField for a single surface to file.
173 // One value per face or vertex (isNodeValues = true)
176 const fileName& outputDir, // <case>/surface/TIME
177 const fileName& surfaceName, // name of surface
178 const pointField& points,
179 const faceList& faces,
180 const word& fieldName, // name of field
181 const Field<tensor>& values,
182 const bool isNodeValues,
183 const bool verbose = false
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 } // End namespace Foam
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197 // ************************************************************************* //