OpenFOAM
5.0
The OpenFOAM Foundation
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
w
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
Enumerator
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
v
w
+
Enumerations
a
b
c
d
e
f
g
i
k
l
m
o
p
r
s
t
v
w
+
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Related Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
+
Files
File List
+
File Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Typedefs
b
c
d
f
g
k
l
m
p
r
s
t
v
w
+
Macros
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
src
OpenFOAM
interpolations
interpolationWeights
linearInterpolationWeights
linearInterpolationWeights.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) 2012 OpenFOAM Foundation
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::linearInterpolationWeights
26
27
Description
28
29
SourceFiles
30
linearInterpolationWeights.C
31
32
\*---------------------------------------------------------------------------*/
33
34
#ifndef linearInterpolationWeights_H
35
#define linearInterpolationWeights_H
36
37
#include "
interpolationWeights.H
"
38
39
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40
41
namespace
Foam
42
{
43
44
/*---------------------------------------------------------------------------*\
45
Class linearInterpolationWeights Declaration
46
\*---------------------------------------------------------------------------*/
47
48
class
linearInterpolationWeights
49
:
50
public
interpolationWeights
51
{
52
53
private
:
54
55
// Private data
56
57
//- Cached index in samples from previous invocation
58
mutable
label
index_;
59
60
// Private Member Functions
61
62
//- Get weights of i and i+1 to calculate integration from t to
63
// samples_[i+1]
64
Pair<scalar>
integrationWeights
65
(
66
const
label
i,
67
const
scalar t
68
)
const
;
69
70
public
:
71
72
//- Runtime type information
73
TypeName
(
"linear"
);
74
75
// Constructors
76
77
//- Construct from components
78
linearInterpolationWeights
79
(
80
const
scalarField
&
samples
81
);
82
83
84
//- Destructor
85
virtual
~linearInterpolationWeights
()
86
{}
87
88
89
// Member Functions
90
91
//- Calculate weights and indices to calculate t from samples.
92
// Returns true if indices changed.
93
virtual
bool
valueWeights
94
(
95
const
scalar t,
96
labelList
& indices,
97
scalarField
& weights
98
)
const
;
99
100
//- Calculate weights and indices to calculate integrand of t1..t2
101
// from samples. Returns true if indices changed.
102
virtual
bool
integrationWeights
103
(
104
const
scalar t1,
105
const
scalar t2,
106
labelList
& indices,
107
scalarField
& weights
108
)
const
;
109
};
110
111
112
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113
114
}
// End namespace Foam
115
116
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117
118
#endif
119
120
// ************************************************************************* //
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition:
label.H:59
Foam::List< label >
Foam::interpolationWeights
Abstract base class for interpolating in 1D.
Definition:
interpolationWeights.H:55
Foam::linearInterpolationWeights::TypeName
TypeName("linear")
Runtime type information.
samples
scalarField samples(nIntervals, 0)
Foam::linearInterpolationWeights::valueWeights
virtual bool valueWeights(const scalar t, labelList &indices, scalarField &weights) const
Calculate weights and indices to calculate t from samples.
Definition:
linearInterpolationWeights.C:88
Foam::Pair
An ordered pair of two objects of type <T> with first() and second() elements.
Definition:
contiguous.H:49
Foam::Field< scalar >
Foam::linearInterpolationWeights::linearInterpolationWeights
linearInterpolationWeights(const scalarField &samples)
Construct from components.
Definition:
linearInterpolationWeights.C:76
Foam::linearInterpolationWeights::~linearInterpolationWeights
virtual ~linearInterpolationWeights()
Destructor.
Definition:
linearInterpolationWeights.H:84
interpolationWeights.H
Foam::linearInterpolationWeights
Definition:
linearInterpolationWeights.H:47
Foam
Namespace for OpenFOAM.
Definition:
combustionModel.C:30
Generated by
1.8.13