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/>.
28 A surfaceWriter for OpenDX format.
33 \*---------------------------------------------------------------------------*/
35 #ifndef dxSurfaceWriter_H
36 #define dxSurfaceWriter_H
38 #include "surfaceWriter.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 /*---------------------------------------------------------------------------*\
46 Class dxSurfaceWriter Declaration
47 \*---------------------------------------------------------------------------*/
54 // Private Member Functions
56 static void writeGeometry(Ostream&, const pointField&, const faceList&);
57 static void writeTrailer(Ostream&, const bool isNodeValues);
60 static void writeData(Ostream&, const Field<Type>&);
62 //- Templated write operation
66 const fileName& outputDir,
67 const fileName& surfaceName,
68 const pointField& points,
69 const faceList& faces,
70 const word& fieldName,
71 const Field<Type>& values,
72 const bool isNodeValues,
79 //- Runtime type information
90 virtual ~dxSurfaceWriter();
95 //- Write scalarField for a single surface to file.
96 // One value per face or vertex (isNodeValues = true)
99 const fileName& outputDir, // <case>/surface/TIME
100 const fileName& surfaceName, // name of surface
101 const pointField& points,
102 const faceList& faces,
103 const word& fieldName, // name of field
104 const Field<scalar>& values,
105 const bool isNodeValues,
106 const bool verbose = false
109 //- Write vectorField for a single surface to file.
110 // One value per face or vertex (isNodeValues = true)
113 const fileName& outputDir, // <case>/surface/TIME
114 const fileName& surfaceName, // name of surface
115 const pointField& points,
116 const faceList& faces,
117 const word& fieldName, // name of field
118 const Field<vector>& values,
119 const bool isNodeValues,
120 const bool verbose = false
123 //- Write sphericalTensorField for a single surface to file.
124 // One value per face or vertex (isNodeValues = true)
127 const fileName& outputDir, // <case>/surface/TIME
128 const fileName& surfaceName, // name of surface
129 const pointField& points,
130 const faceList& faces,
131 const word& fieldName, // name of field
132 const Field<sphericalTensor>& values,
133 const bool isNodeValues,
134 const bool verbose = false
137 //- Write symmTensorField for a single surface to file.
138 // One value per face or vertex (isNodeValues = true)
141 const fileName& outputDir, // <case>/surface/TIME
142 const fileName& surfaceName, // name of surface
143 const pointField& points,
144 const faceList& faces,
145 const word& fieldName, // name of field
146 const Field<symmTensor>& values,
147 const bool isNodeValues,
148 const bool verbose = false
151 //- Write tensorField for a single surface to file.
152 // One value per face or vertex (isNodeValues = true)
155 const fileName& outputDir, // <case>/surface/TIME
156 const fileName& surfaceName, // name of surface
157 const pointField& points,
158 const faceList& faces,
159 const word& fieldName, // name of field
160 const Field<tensor>& values,
161 const bool isNodeValues,
162 const bool verbose = false
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 } // End namespace Foam
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 // ************************************************************************* //