OpenFOAM
6
The OpenFOAM Foundation
Main Page
+
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
v
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
v
+
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
Pages
src
OpenFOAM
interpolations
interpolationWeights
splineInterpolationWeights
splineInterpolationWeights.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration | Website: https://openfoam.org
5
\\ / A nd | Copyright (C) 2012-2018 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::splineInterpolationWeights
26
27
Description
28
Catmull-Rom spline interpolation.
29
30
SourceFiles
31
splineInterpolationWeights.C
32
33
\*---------------------------------------------------------------------------*/
34
35
#ifndef splineInterpolationWeights_H
36
#define splineInterpolationWeights_H
37
38
#include "
interpolationWeights.H
"
39
40
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41
42
namespace
Foam
43
{
44
45
/*---------------------------------------------------------------------------*\
46
Class splineInterpolationWeights Declaration
47
\*---------------------------------------------------------------------------*/
48
49
class
splineInterpolationWeights
50
:
51
public
interpolationWeights
52
{
53
54
private
:
55
56
// Private data
57
58
//- Cached index in samples from previous invocation
59
mutable
label
index_;
60
61
public
:
62
63
//- Runtime type information
64
TypeName
(
"spline"
);
65
66
// Constructors
67
68
//- Construct from components. By default make sure samples are
69
// equidistant.
70
splineInterpolationWeights
71
(
72
const
scalarField
&
samples
,
73
const
bool
checkEqualDistance =
true
74
);
75
76
77
//- Destructor
78
virtual
~splineInterpolationWeights
()
79
{}
80
81
82
// Member Functions
83
84
//- Calculate weights and indices to calculate t from samples.
85
// Returns true if indices changed.
86
virtual
bool
valueWeights
87
(
88
const
scalar t,
89
labelList
& indices,
90
scalarField
& weights
91
)
const
;
92
93
//- Calculate weights and indices to calculate integrand of t1..t2
94
// from samples. Returns true if indices changed.
95
virtual
bool
integrationWeights
96
(
97
const
scalar t1,
98
const
scalar t2,
99
labelList
& indices,
100
scalarField
& weights
101
)
const
102
{
103
NotImplemented
;
104
return
false
;
105
}
106
107
};
108
109
110
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111
112
}
// End namespace Foam
113
114
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115
116
#endif
117
118
// ************************************************************************* //
Foam::splineInterpolationWeights::integrationWeights
virtual bool integrationWeights(const scalar t1, const scalar t2, labelList &indices, scalarField &weights) const
Calculate weights and indices to calculate integrand of t1..t2.
Definition:
splineInterpolationWeights.H:95
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::splineInterpolationWeights::~splineInterpolationWeights
virtual ~splineInterpolationWeights()
Destructor.
Definition:
splineInterpolationWeights.H:77
Foam::splineInterpolationWeights::splineInterpolationWeights
splineInterpolationWeights(const scalarField &samples, const bool checkEqualDistance=true)
Construct from components. By default make sure samples are.
Definition:
splineInterpolationWeights.C:50
Foam::interpolationWeights
Abstract base class for interpolating in 1D.
Definition:
interpolationWeights.H:55
Foam::splineInterpolationWeights::TypeName
TypeName("spline")
Runtime type information.
samples
scalarField samples(nIntervals, 0)
Foam::Field< scalar >
Foam::splineInterpolationWeights
Catmull-Rom spline interpolation.
Definition:
splineInterpolationWeights.H:48
interpolationWeights.H
Foam::splineInterpolationWeights::valueWeights
virtual bool valueWeights(const scalar t, labelList &indices, scalarField &weights) const
Calculate weights and indices to calculate t from samples.
Definition:
splineInterpolationWeights.C:82
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition:
error.H:366
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:30
Generated by
1.8.13