vtkSetWriter.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::vtkSetWriter
29 
30 Description
31 
32 Note
33  The output order of symmTensor is incorrect.
34 
35 SourceFiles
36  vtkSetWriter.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef vtkSetWriter_H
41 #define vtkSetWriter_H
42 
43 #include "writer.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class vtkSetWriter Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 template<class Type>
55 class vtkSetWriter
56 :
57  public writer<Type>
58 {
59 public:
60 
61  //- Runtime type information
62  TypeName("vtk");
63 
64 
65  // Constructors
66 
67  //- Default construct
68  vtkSetWriter();
69 
70  //- Construct with dictionary
71  explicit vtkSetWriter(const dictionary& dict);
72 
73 
74  //- Destructor
75  virtual ~vtkSetWriter() = default;
76 
77 
78  // Member Functions
79 
80  virtual fileName getFileName
81  (
82  const coordSet&,
83  const wordList&
84  ) const;
85 
86  virtual void write
87  (
88  const coordSet&,
89  const wordList&,
90  const List<const Field<Type>*>&,
91  Ostream&
92  ) const;
93 
94  virtual void write
95  (
96  const bool writeTracks,
97  const List<scalarField>& times,
98  const PtrList<coordSet>& tracks,
99  const wordList& valueSetNames,
100  const List<List<Field<Type>>>& valueSets,
101  Ostream&
102  ) const;
103 };
104 
105 
106 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
107 
108 } // End namespace Foam
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 
112 #ifdef NoRepository
113  #include "vtkSetWriter.C"
114 #endif
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 #endif
119 
120 // ************************************************************************* //
Foam::fileName
A class for handling file names.
Definition: fileName.H:73
Foam::vtkSetWriter
Definition: vtkSetWriter.H:54
Foam::Field
Generic templated field type.
Definition: Field.H:63
Foam::vtkSetWriter::TypeName
TypeName("vtk")
Runtime type information.
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::vtkSetWriter::write
virtual void write(const coordSet &, const wordList &, const List< const Field< Type > * > &, Ostream &) const
General entry point for writing.
Definition: vtkSetWriter.C:67
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::vtkSetWriter::~vtkSetWriter
virtual ~vtkSetWriter()=default
Destructor.
Foam::vtkSetWriter::vtkSetWriter
vtkSetWriter()
Default construct.
Definition: vtkSetWriter.C:39
Foam::List< word >
vtkSetWriter.C
Foam::vtkSetWriter::getFileName
virtual fileName getFileName(const coordSet &, const wordList &) const
Generate file name with correct extension.
Definition: vtkSetWriter.C:56
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
writer.H