Doxygen 1.9.1
Toolkit for Adaptive Stochastic Modeling and Non-Intrusive ApproximatioN: Tasmanian v8.2 (development)
TasGrid::CacheLagrangeDerivative< T > Class Template Reference

Cache that holds the derivatives of 1D Lagrange polynomials. Uses the same interface as CacheLagrange. . More...

#include <tsgCacheLagrange.hpp>

Public Member Functions

 CacheLagrangeDerivative (int num_dimensions, const std::vector< int > &max_levels, const OneDimensionalWrapper &rule, const double x[])
 Constructor that takes into account a single canonical point x. More...
 
 ~CacheLagrangeDerivative ()=default
 Destructor, clear all used data.
 
getLagrangeDerivative (int dimension, int level, int local) const
 Return the Lagrange derivative cache for given dimension, level and offset local to the level.
 

Static Public Member Functions

static void cacheDerivativeLevel (int level, double x, const OneDimensionalWrapper &rule, T *cc)
 Computes the derivatives of all Lagrange polynomials for the given level at the given x.
 

Protected Attributes

std::vector< std::vector< T > > cache
 See CacheLagrange::cache.
 
std::vector< int > offsets
 See CacheLagrange::offsets.
 

Detailed Description

template<typename T>
class TasGrid::CacheLagrangeDerivative< T >

Cache that holds the derivatives of 1D Lagrange polynomials. Uses the same interface as CacheLagrange.

.

Constructor & Destructor Documentation

◆ CacheLagrangeDerivative()

template<typename T >
TasGrid::CacheLagrangeDerivative< T >::CacheLagrangeDerivative ( int  num_dimensions,
const std::vector< int > &  max_levels,
const OneDimensionalWrapper rule,
const double  x[] 
)
inline

Constructor that takes into account a single canonical point x.

The cache is constructed for each dimension and each level up to max_levels, the derivatives of the Lagrange polynomials are computed in two passes resulting in O(n) operations.

  • num_dimensions is the number of dimensions to consider
  • max_levels indicates how many levels to consider in each direction, heavily anisotropic grids require only a few levels for the "less important" directions
  • rule is the wrapper of the Global grid that contains information about number of points per level and the actual nodes with the pre-computed Lagrange coefficients
  • holds the coordinates of the canonical point to cache

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