ensightSetWriter.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2021 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::ensightSetWriter
29 
30 Description
31 
32 SourceFiles
33  ensightSetWriter.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef ensightSetWriter_H
38 #define ensightSetWriter_H
39 
40 #include "writer.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class ensightSetWriter Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 template<class Type>
52 class ensightSetWriter
53 :
54  public writer<Type>
55 {
56 
57 public:
58 
59  //- Runtime type information
60  TypeName("ensight");
61 
62 
63  // Constructors
64 
65  //- Default construct
67 
68  //- Construct with dictionary
69  explicit ensightSetWriter(const dictionary& dict);
70 
71 
72  //- Destructor
73  virtual ~ensightSetWriter() = default;
74 
75 
76  // Member Functions
77 
78  virtual fileName getFileName
79  (
80  const coordSet&,
81  const wordList&
82  ) const;
83 
84  virtual void write
85  (
86  const coordSet&,
87  const wordList&,
88  const List<const Field<Type>*>&,
89  Ostream&
90  ) const;
91 
92  virtual void write
93  (
94  const bool writeTracks,
95  const List<scalarField>& times,
96  const PtrList<coordSet>& tracks,
97  const wordList& valueSetNames,
98  const List<List<Field<Type>>>& valueSets,
99  Ostream&
100  ) const;
101 };
102 
103 
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
105 
106 } // End namespace Foam
107 
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 
110 #ifdef NoRepository
111  #include "ensightSetWriter.C"
112 #endif
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 #endif
117 
118 // ************************************************************************* //
Foam::fileName
A class for handling file names.
Definition: fileName.H:73
Foam::ensightSetWriter::getFileName
virtual fileName getFileName(const coordSet &, const wordList &) const
Generate file name with correct extension.
Definition: ensightSetWriter.C:56
Foam::ensightSetWriter::~ensightSetWriter
virtual ~ensightSetWriter()=default
Destructor.
Foam::ensightSetWriter::ensightSetWriter
ensightSetWriter()
Default construct.
Definition: ensightSetWriter.C:39
Foam::ensightSetWriter::TypeName
TypeName("ensight")
Runtime type information.
Foam::Field
Generic templated field type.
Definition: Field.H:63
ensightSetWriter.C
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:59
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::writer
Base class for graphics format writing. Entry points are.
Definition: writer.H:81
Foam::coordSet
Holds list of sampling positions.
Definition: coordSet.H:53
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::List< word >
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
writer.H
Foam::ensightSetWriter::write
virtual void write(const coordSet &, const wordList &, const List< const Field< Type > * > &, Ostream &) const
General entry point for writing.
Definition: ensightSetWriter.C:71
Foam::ensightSetWriter
Definition: ensightSetWriter.H:51