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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::openFoamTableReader
29
30Description
31 Reads an interpolation table from a file - OpenFOAM-format
32
33SourceFiles
34 openFoamTableReader.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef openFoamTableReader_H
39#define openFoamTableReader_H
40
41#include "tableReader.H"
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45namespace Foam
46{
47
48/*---------------------------------------------------------------------------*\
49 Class openFoamTableReader Declaration
50\*---------------------------------------------------------------------------*/
51
52template<class Type>
54:
55 public tableReader<Type>
56{
57public:
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// ************************************************************************* //
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: List.H:77
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Database for solution data, solver performance and other reduced data.
Definition: data.H:58
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A class for handling file names.
Definition: fileName.H:76
Reads an interpolation table from a file - OpenFOAM-format.
TypeName("openFoam")
Declare type-name, virtual type (with debug switch)
virtual autoPtr< tableReader< Type > > clone() const
Construct and return a copy.
openFoamTableReader()=default
Default construct.
virtual ~openFoamTableReader()=default
Destructor.
Base class to read table data for the interpolationTable.
Definition: tableReader.H:61
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73