ensightSurfaceWriter.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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
19  for more details.
20 
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/>.
23 
24 Class
25  Foam::ensightSurfaceWriter
26 
27 Description
28  A surfaceWriter for Ensight format.
29 
30 SourceFiles
31  ensightSurfaceWriter.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef ensightSurfaceWriter_H
36 #define ensightSurfaceWriter_H
37 
38 #include "surfaceWriter.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class ensightSurfaceWriter Declaration
47 \*---------------------------------------------------------------------------*/
48 
50 :
51  public surfaceWriter
52 {
53 public:
54 
55  //- Runtime type information
56  TypeName("ensight");
57 
58 
59  // Constructors
60 
61  //- Inherit constructors
63 
64 
65  //- Destructor
66  virtual ~ensightSurfaceWriter();
67 
68 
69  // Member Functions
70 
71  //- Write fields for a single surface to file.
72  virtual void write
73  (
74  const fileName& outputDir, // <case>/surface/TIME
75  const fileName& surfaceName, // name of surface
76  const pointField& points,
77  const faceList& faces,
78  const wordList& fieldNames, // names of fields
79  const bool writePointValues
80  #define FieldTypeValuesConstArg(Type, nullArg) \
81  , const UPtrList<const Field<Type>>& field##Type##Values
84  ) const;
85 
86  //- Inherit base class templated write
88 };
89 
90 
91 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
92 
93 } // End namespace Foam
94 
95 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
96 
97 #endif
98 
99 // ************************************************************************* //
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: UPtrList.H:66
A surfaceWriter for Ensight format.
virtual ~ensightSurfaceWriter()
Destructor.
virtual void write(const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const wordList &fieldNames, const bool writePointValues #define FieldTypeValuesConstArg(Type, nullArg)) const=0
Inherit base class templated write.
TypeName("ensight")
Runtime type information.
A class for handling file names.
Definition: fileName.H:82
Base class for surface writers.
Definition: surfaceWriter.H:55
surfaceWriter(const IOstream::streamFormat writeFormat, const IOstream::compressionType writeCompression)
Construct given write options.
Definition: surfaceWriter.C:44
virtual void write(const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const wordList &fieldNames, const bool writePointValues #define FieldTypeValuesConstArg(Type, nullArg)) const =0
Write fields for a single surface to file.
#define FieldTypeValuesConstArg(Type, nullArg)
static List< word > fieldNames
Definition: globalFoam.H:46
const pointField & points
Namespace for OpenFOAM.
FOR_ALL_FIELD_TYPES(DefineContiguousFvWallLocationDataType)