1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 Write binary tecplot files using tecio.
33 tecplotWriterTemplates.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef tecplotWriter_H
38 #define tecplotWriter_H
42 #include "indirectPrimitivePatch.H"
43 #include "volFields.H"
44 #include "surfaceFields.H"
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 /*---------------------------------------------------------------------------*\
56 Class tecplotWriter Declaration
57 \*---------------------------------------------------------------------------*/
67 //- Construct from components
68 tecplotWriter(const Time&);
76 const string& varNames,
78 INTEGER4 tecplotFileType
81 //- Write mesh as polyhedral zone
82 void writePolyhedralZone
85 const INTEGER4 strandID,
87 const List<INTEGER4>& varLocArray,
91 //- Write surface as polygonal zone
92 void writePolygonalZone
95 const INTEGER4 strandID,
96 const indirectPrimitivePatch& pp,
97 const List<INTEGER4>& varLocArray
100 //- Write unordered data (or rather 1D ordered)
101 void writeOrderedZone
103 const word& zoneName,
106 const List<INTEGER4>& varLocArray
110 void writeConnectivity(const fvMesh& mesh) const;
113 void writeConnectivity(const indirectPrimitivePatch& pp) const;
115 void writeEnd() const;
117 //- Write generic Field
119 void writeField(const Field<Type>& fld) const;
122 //- Get either fvPatchField or patchInternalField
124 tmp<Field<Type> > getPatchField
126 const bool nearCellValue,
127 const GeometricField<Type, fvPatchField, volMesh>& vfld,
131 //- Get mixed field: fvsPatchField for boundary faces and
132 // internalField for internal faces.
134 tmp<Field<Type> > getFaceField
136 const GeometricField<Type, fvsPatchField, surfaceMesh>&,
137 const labelList& faceLabels
140 template<class GeoField>
141 static wordList getNames(const PtrList<GeoField>&);
144 static void getTecplotNames
146 const wordList& names,
149 DynamicList<INTEGER4>& varLocation
152 template<class GeoField>
153 static void getTecplotNames
155 const PtrList<GeoField>& flds,
158 DynamicList<INTEGER4>& varLocation
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 } // End namespace Foam
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 # include "tecplotWriterTemplates.C"
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 // ************************************************************************* //