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