OpenFOAM
12
The OpenFOAM Foundation
linearInterpolationWeights.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-2020 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
// Private Data
53
54
//- Cached index in samples from previous invocation
55
mutable
label
index_;
56
57
58
public
:
59
60
//- Runtime type information
61
TypeName
(
"linear"
);
62
63
64
// Constructors
65
66
//- Construct from components
67
linearInterpolationWeights
68
(
69
const
scalarField
&
samples
70
);
71
72
73
//- Destructor
74
virtual
~linearInterpolationWeights
()
75
{}
76
77
78
// Member Functions
79
80
//- Calculate weights and indices to calculate t from samples.
81
// Returns true if indices changed.
82
virtual
bool
valueWeights
83
(
84
const
scalar t,
85
labelList
& indices,
86
scalarField
& weights
87
)
const
;
88
89
//- Calculate weights and indices to calculate integrand of t1..t2
90
// from samples. Returns true if indices changed.
91
virtual
bool
integrationWeights
92
(
93
scalar t1,
94
scalar t2,
95
labelList
& indices,
96
scalarField
& weights
97
)
const
;
98
};
99
100
101
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
102
103
}
// End namespace Foam
104
105
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106
107
#endif
108
109
// ************************************************************************* //
Foam::Field< scalar >
Foam::List< label >
Foam::interpolationWeights
Abstract base class for interpolating in 1D.
Definition:
interpolationWeights.H:56
Foam::linearInterpolationWeights
Definition:
linearInterpolationWeights.H:50
Foam::linearInterpolationWeights::integrationWeights
virtual bool integrationWeights(scalar t1, scalar t2, labelList &indices, scalarField &weights) const
Calculate weights and indices to calculate integrand of t1..t2.
Definition:
linearInterpolationWeights.C:131
Foam::linearInterpolationWeights::~linearInterpolationWeights
virtual ~linearInterpolationWeights()
Destructor.
Definition:
linearInterpolationWeights.H:73
Foam::linearInterpolationWeights::linearInterpolationWeights
linearInterpolationWeights(const scalarField &samples)
Construct from components.
Definition:
linearInterpolationWeights.C:50
Foam::linearInterpolationWeights::TypeName
TypeName("linear")
Runtime type information.
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:62
interpolationWeights.H
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.H:214
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
samples
scalarField samples(nIntervals, 0)
src
OpenFOAM
interpolations
interpolationWeights
linearInterpolationWeights
linearInterpolationWeights.H
Generated by
1.9.1