openFoamTableReader.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) 2020 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::openFoamTableReader
29 
30 Description
31  Reads an interpolation table from a file - OpenFOAM-format
32 
33 SourceFiles
34  openFoamTableReader.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef openFoamTableReader_H
39 #define openFoamTableReader_H
40 
41 #include "tableReader.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class openFoamTableReader Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 template<class Type>
54 :
55  public tableReader<Type>
56 {
57 public:
58 
59  //- Declare type-name, virtual type (with debug switch)
60  TypeName("openFoam");
61 
62 
63  // Generated Methods
64 
65  //- Default construct
66  openFoamTableReader() = default;
67 
68  //- Destructor
69  virtual ~openFoamTableReader() = default;
70 
71 
72  // Constructors
73 
74  //- Construct from dictionary
75  explicit openFoamTableReader(const dictionary& dict);
76 
77  //- Construct and return a copy
78  virtual autoPtr<tableReader<Type>> clone() const
79  {
81  (
83  (
84  *this
85  )
86  );
87  }
88 
89 
90  // Member Functions
91 
92  //- Read 1D table
93  virtual void operator()
94  (
95  const fileName& fName,
97  );
98 
99  //- Read 2D table
100  virtual void operator()
101  (
102  const fileName& fName,
104  );
105 };
106 
107 
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 
110 } // End namespace Foam
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 #ifdef NoRepository
115  #include "openFoamTableReader.C"
116 #endif
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 #endif
121 
122 // ************************************************************************* //
openFoamTableReader.C
Foam::openFoamTableReader
Reads an interpolation table from a file - OpenFOAM-format.
Definition: openFoamTableReader.H:52
Foam::openFoamTableReader::clone
virtual autoPtr< tableReader< Type > > clone() const
Construct and return a copy.
Definition: openFoamTableReader.H:77
Foam::fileName
A class for handling file names.
Definition: fileName.H:73
Foam::tableReader
Base class to read table data for the interpolationTable.
Definition: tableReader.H:60
Foam::openFoamTableReader::~openFoamTableReader
virtual ~openFoamTableReader()=default
Destructor.
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::openFoamTableReader::TypeName
TypeName("openFoam")
Declare type-name, virtual type (with debug switch)
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::openFoamTableReader::openFoamTableReader
openFoamTableReader()=default
Default construct.
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: BitOps.H:63
Foam::data
Database for solution data, solver performance and other reduced data.
Definition: data.H:55
tableReader.H