Project
Loading...
Searching...
No Matches
o2::tpc::TriCubicInterpolator< DataT > Class Template Reference

#include <TriCubic.h>

Public Types

enum class  ExtrapolationType { Linear = 0 , Parabola = 1 }
 

Public Member Functions

 TriCubicInterpolator (const DataContainer &gridData, const Grid3D &gridProperties)
 
 TriCubicInterpolator (TriCubicInterpolator< DataT > &&)
 move constructor
 
TriCubicInterpolator< DataT > & operator= (TriCubicInterpolator< DataT > &&)
 move assignment
 
DataT operator() (const DataT z, const DataT r, const DataT phi) const
 
void setExtrapolationType (const ExtrapolationType extrapolationType)
 
ExtrapolationType getExtrapolationType () const
 
void setExtrapolateValues (const bool extraPolate)
 enable or disable extraolating values outside of the grid
 
bool getExtrapolateValues () const
 

Detailed Description

template<typename DataT = double>
class o2::tpc::TriCubicInterpolator< DataT >
Template Parameters
DataTthe type of data which is used during the calculations

The TriCubic class represents tricubic interpolation on a regular 3-Dim grid. The algorithm which is used is based on the method developed by F. Lekien and J. Marsden and is described in 'Tricubic Interpolation in Three Dimensions (2005)' http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.89.7835 In this method in a first step 64 coefficients are computed by using a predefined 64*64 matrix. These coefficients have to be computed for each cell in the grid, but are only computed when querying a point in a given cell. The calculated coefficient is then stored for only the last cell and will be reused if the next query point lies in the same cell.

Additionally the classical one dimensional approach of interpolating values is implemented. This algorithm is faster when interpolating only a few values inside each cube.

periodic boundary conditions are used in phi direction.

Definition at line 51 of file TriCubic.h.

Member Enumeration Documentation

◆ ExtrapolationType

template<typename DataT = double>
enum class o2::tpc::TriCubicInterpolator::ExtrapolationType
strong
Enumerator
Linear 

assume linear dependency at the boundaries of the grid

Parabola 

assume parabolic dependency at the boundaries of the grid

Definition at line 68 of file TriCubic.h.

Constructor & Destructor Documentation

◆ TriCubicInterpolator() [1/2]

template<typename DataT = double>
o2::tpc::TriCubicInterpolator< DataT >::TriCubicInterpolator ( const DataContainer gridData,
const Grid3D gridProperties 
)
inline

Constructor for a tricubic interpolator

Parameters
gridDatastruct containing access to the values of the grid
gridPropertiesproperties of the 3D grid

Definition at line 60 of file TriCubic.h.

◆ TriCubicInterpolator() [2/2]

template<typename DataT >
TriCubicInterpolator::TriCubicInterpolator ( TriCubicInterpolator< DataT > &&  other)

move constructor

default move constructor

Definition at line 25 of file TriCubic.cxx.

Member Function Documentation

◆ getExtrapolateValues()

template<typename DataT = double>
bool o2::tpc::TriCubicInterpolator< DataT >::getExtrapolateValues ( ) const
inline
Returns
returns whethere values outside of the grid will be extrapolated

Definition at line 92 of file TriCubic.h.

◆ getExtrapolationType()

template<typename DataT = double>
ExtrapolationType o2::tpc::TriCubicInterpolator< DataT >::getExtrapolationType ( ) const
inline
Returns
returns the extrapolation technique for missing boundary values

Definition at line 86 of file TriCubic.h.

◆ operator()()

template<typename DataT = double>
DataT o2::tpc::TriCubicInterpolator< DataT >::operator() ( const DataT  z,
const DataT  r,
const DataT  phi 
) const
inline
Parameters
zz coordinate
rr coordinate
phiphi coordinate
typeinterpolation algorithm
Returns
returns the interpolated value at given coordinate

Definition at line 79 of file TriCubic.h.

◆ operator=()

template<typename DataT >
TriCubicInterpolator< DataT > & TriCubicInterpolator::operator= ( TriCubicInterpolator< DataT > &&  other)

move assignment

Definition at line 36 of file TriCubic.cxx.

◆ setExtrapolateValues()

template<typename DataT = double>
void o2::tpc::TriCubicInterpolator< DataT >::setExtrapolateValues ( const bool  extraPolate)
inline

enable or disable extraolating values outside of the grid

Definition at line 89 of file TriCubic.h.

◆ setExtrapolationType()

template<typename DataT = double>
void o2::tpc::TriCubicInterpolator< DataT >::setExtrapolationType ( const ExtrapolationType  extrapolationType)
inline

set which type of extrapolation is used at the grid boundaries (linear or parabol can be used with periodic phi axis and non periodic z and r axis).

Parameters
extrapolationTypesets type of extrapolation. See enum ExtrapolationType for different types

Definition at line 83 of file TriCubic.h.


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