stepInterpolationWeights Class Reference

Generates the weight for step-wise interpolation and integration. More...

Inheritance diagram for stepInterpolationWeights:
Collaboration diagram for stepInterpolationWeights:

Public Member Functions

 TypeName ("step")
 Runtime type information. More...
 
 stepInterpolationWeights (const scalarField &samples)
 Construct from components. More...
 
virtual ~stepInterpolationWeights ()
 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 (scalar t1, scalar t2, labelList &indices, scalarField &weights) const
 Calculate weights and indices to calculate integrand of t1..t2. More...
 
- Public Member Functions inherited from interpolationWeights
 TypeName ("interpolationWeights")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, interpolationWeights, word,(const scalarField &samples),(samples))
 
 interpolationWeights (const scalarField &samples)
 Construct from components. More...
 
 interpolationWeights (const interpolationWeights &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~interpolationWeights ()
 Destructor. More...
 
void operator= (const interpolationWeights &)=delete
 Disallow default bitwise assignment. More...
 
template<class ListType1 , class ListType2 >
Foam::outerProduct< typename ListType1::value_type, typename ListType2::value_type >::type weightedSum (const ListType1 &f1, const ListType2 &f2)
 

Additional Inherited Members

- Static Public Member Functions inherited from interpolationWeights
static autoPtr< interpolationWeightsNew (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)
 Weighted sum helper method. More...
 
- Protected Attributes inherited from interpolationWeights
const scalarFieldsamples_
 Cached samples. More...
 

Detailed Description

Generates the weight for step-wise interpolation and integration.

The step transitions are at the end of each interval.

Source files

Definition at line 50 of file stepInterpolationWeights.H.

Constructor & Destructor Documentation

◆ stepInterpolationWeights()

stepInterpolationWeights ( const scalarField samples)

Construct from components.

Definition at line 47 of file stepInterpolationWeights.C.

◆ ~stepInterpolationWeights()

virtual ~stepInterpolationWeights ( )
inlinevirtual

Destructor.

Definition at line 76 of file stepInterpolationWeights.H.

Member Function Documentation

◆ TypeName()

TypeName ( "step"  )

Runtime type information.

◆ valueWeights()

bool valueWeights ( const scalar  t,
labelList indices,
scalarField weights 
) const
virtual

Calculate weights and indices to calculate t from samples.

Returns true if indices changed.

Implements interpolationWeights.

Definition at line 59 of file stepInterpolationWeights.C.

References Foam::findLower(), UList< T >::first(), UList< T >::last(), n, List< T >::resize(), interpolationWeights::samples_, and List< T >::size().

Here is the call graph for this function:

◆ integrationWeights()

bool integrationWeights ( scalar  t1,
scalar  t2,
labelList indices,
scalarField weights 
) const
virtual

Calculate weights and indices to calculate integrand of t1..t2.

from samples. Returns true if indices changed.

Search for lower indices

Note: currently there is no caching of this search like in valueWeights

Implements interpolationWeights.

Definition at line 125 of file stepInterpolationWeights.C.

References Foam::findLower(), forAll, UList< T >::last(), Foam::max(), Foam::min(), n, List< T >::resize(), interpolationWeights::samples_, Foam::sign(), List< T >::size(), and Foam::Swap().

Here is the call graph for this function:

The documentation for this class was generated from the following files: