Public Member Functions | |
TypeName ("linear") | |
Runtime type information. More... | |
linearInterpolationWeights (const scalarField &samples) | |
Construct from components. More... | |
virtual | ~linearInterpolationWeights () |
Destructor. More... | |
virtual bool | valueWeights (const scalar t, labelList &indices, scalarField &weights) const |
Calculate weights and indices to calculate t from samples. More... | |
virtual bool | integrationWeights (const scalar t1, const scalar t2, labelList &indices, scalarField &weights) const |
Calculate weights and indices to calculate integrand of t1..t2. More... | |
![]() | |
TypeName ("interpolationWeights") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, interpolationWeights, word,(const scalarField &samples),(samples)) | |
interpolationWeights (const scalarField &samples) | |
Construct from components. More... | |
virtual | ~interpolationWeights () |
Destructor. More... | |
template<class ListType1 , class ListType2 > | |
Foam::outerProduct< typename ListType1::value_type, typename ListType2::value_type >::type | weightedSum (const ListType1 &f1, const ListType2 &f2) |
Private Member Functions | |
Pair< scalar > | integrationWeights (const label i, const scalar t) const |
Get weights of i and i+1 to calculate integration from t to. More... | |
Private Attributes | |
label | index_ |
Cached index in samples from previous invocation. More... | |
Additional Inherited Members | |
![]() | |
static autoPtr< interpolationWeights > | New (const word &type, const scalarField &samples) |
Return a reference to the selected interpolationWeights. More... | |
template<class ListType1 , class ListType2 > | |
static outerProduct< typename ListType1::value_type, typename ListType2::value_type >::type | weightedSum (const ListType1 &f1, const ListType2 &f2) |
Helper: weighted sum. More... | |
![]() | |
const scalarField & | samples_ |
Definition at line 47 of file linearInterpolationWeights.H.
linearInterpolationWeights | ( | const scalarField & | samples | ) |
Construct from components.
Definition at line 76 of file linearInterpolationWeights.C.
|
inlinevirtual |
Destructor.
Definition at line 84 of file linearInterpolationWeights.H.
|
private |
Get weights of i and i+1 to calculate integration from t to.
samples_[i+1]
Definition at line 50 of file linearInterpolationWeights.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and s().
TypeName | ( | "linear" | ) |
Runtime type information.
|
virtual |
Calculate weights and indices to calculate t from samples.
Returns true if indices changed.
Implements interpolationWeights.
Definition at line 88 of file linearInterpolationWeights.C.
References Foam::findLower(), List::setSize(), and List::size().
Referenced by splineInterpolationWeights::valueWeights().
|
virtual |
Calculate weights and indices to calculate integrand of t1..t2.
from samples. Returns true if indices changed.
Find lower or equal index
Find lower index
Implements interpolationWeights.
Definition at line 155 of file linearInterpolationWeights.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::findLower(), Pair::first(), forAll, Pair::second(), List::setSize(), and List::size().
|
mutableprivate |
Cached index in samples from previous invocation.
Definition at line 57 of file linearInterpolationWeights.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.