Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
OpenFOAM
interpolations
interpolationTable
tableReaders
tableReader.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 | Copyright (C) 1991-2011 OpenCFD Ltd.
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
License
9
This file is part of OpenFOAM.
10
11
OpenFOAM is free software: you can redistribute it and/or modify it
12
under the terms of the GNU General Public License as published by
13
the Free Software Foundation, either version 3 of the License, or
14
(at your option) any later version.
15
16
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19
for more details.
20
21
You should have received a copy of the GNU General Public License
22
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23
24
Class
25
Foam::tableReader
26
27
Description
28
Base class to read table data for the interpolationTable
29
30
SourceFiles
31
tableReader.C
32
33
\*---------------------------------------------------------------------------*/
34
35
#ifndef tableReader_H
36
#define tableReader_H
37
38
#include <
OpenFOAM/fileName.H
>
39
#include <
OpenFOAM/wordList.H
>
40
#include <
OpenFOAM/vector.H
>
41
#include <
OpenFOAM/tensor.H
>
42
#include <
OpenFOAM/typeInfo.H
>
43
#include <
OpenFOAM/runTimeSelectionTables.H
>
44
#include <
OpenFOAM/autoPtr.H
>
45
#include <
OpenFOAM/dictionary.H
>
46
#include <
OpenFOAM/Tuple2.H
>
47
48
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50
namespace
Foam
51
{
52
53
/*---------------------------------------------------------------------------*\
54
Class tableReader Declaration
55
\*---------------------------------------------------------------------------*/
56
57
template
<
class
Type>
58
class
tableReader
59
{
60
61
public
:
62
63
//- Runtime type information
64
TypeName
(
"tableReader"
);
65
66
// Declare run-time constructor selection table
67
68
declareRunTimeSelectionTable
69
(
70
autoPtr
,
71
tableReader
,
72
dictionary
,
73
(
const
dictionary
& dict),
74
(dict)
75
);
76
77
78
// Constructors
79
80
//- Construct from dictionary
81
tableReader
(
const
dictionary
& dict);
82
83
//- Construct and return a clone
84
virtual
autoPtr<tableReader<Type>
>
clone
()
const
= 0;
85
86
87
// Selectors
88
89
//- Return a reference to the selected tableReader
90
static
autoPtr<tableReader>
New
(
const
dictionary
& spec);
91
92
93
//- Destructor
94
95
virtual
~tableReader
();
96
97
98
// Member functions
99
100
//- Read the table
101
virtual
void
operator()
102
(
103
const
fileName
&,
104
List<Tuple2<scalar, Type>
>&
105
) = 0;
106
107
//- Write additional information
108
virtual
void
write
(
Ostream
& os)
const
;
109
110
};
111
112
113
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114
115
}
// End namespace Foam
116
117
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118
119
#ifdef NoRepository
120
# include "
tableReader.C
"
121
#endif
122
123
124
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125
126
#endif
127
128
// ************************ vim: set sw=4 sts=4 et: ************************ //