Doxygen 1.9.1
Toolkit for Adaptive Stochastic Modeling and Non-Intrusive ApproximatioN: Tasmanian v8.2 (development)
TasGrid::OneDimensionalWrapper Class Reference

A class to cache one dimensional rules, nodes, weight, meta-data, etc. More...

#include <tsgOneDimensionalWrapper.hpp>

Public Member Functions

 OneDimensionalWrapper ()
 Default constructor, create an emptry cache.
 
 ~OneDimensionalWrapper ()=default
 Default destructor.
 
 OneDimensionalWrapper (const CustomTabulated &custom, int max_level, TypeOneDRule crule, double alpha, double beta)
 Load the cache. More...
 
 OneDimensionalWrapper (int max_level, TypeOneDRule crule, double alpha, double beta)
 Overload that skips the custom rule altogether, more convenient in Fourier grids.
 
int getNumPoints (int level) const
 Get the number of points for the level, can only query loaded levels.
 
int getPointIndex (int level, int j) const
 Get the global index of point j on level (used only by non-nested rules).
 
int getLevel (int point)
 Returns the first level associated with this point (nested rules only!).
 
std::vector< int > getLevels (std::vector< int > const &point)
 
int getNumNodes () const
 Get number of loaded nodes.
 
double getNode (int j) const
 Get the canonical coordinate of the node with global index j.
 
double getWeight (int level, int j) const
 Get the quadrature weight of the j-th node on the level (for non-nested rules, using index local to the level)
 
const double * getNodes (int level) const
 Get an array of all nodes associated with the level (the array is ordered by local index).
 
const double * getCoefficients (int level) const
 Get an array of the Lagrange coefficients associated with the level, the order matches getNodes().
 
const std::vector< int > & getPointsCount () const
 Get a reference to the offsets of all point counts used by the CacheLagrange class.
 
TypeOneDRule getRule () const
 Get the loaded rule.
 
int getNumLevels () const
 Get the number of cached levels.
 
const std::vector< double > & getUnique () const
 Return reference to all unique nodes.
 
std::vector< double > getAllNodes () const
 Return all nodes concatenated per level.
 
std::vector< double > getAllCoeff () const
 Return all coefficients concatenated per level.
 
const std::vector< int > & getNumNodesPerLevel () const
 Return reference to the number of nodes per level.
 
std::vector< int > getOffsetNodesPerLevel () const
 Return cumulative points per level.
 

Detailed Description

A class to cache one dimensional rules, nodes, weight, meta-data, etc.

Constructor & Destructor Documentation

◆ OneDimensionalWrapper()

TasGrid::OneDimensionalWrapper::OneDimensionalWrapper ( const CustomTabulated custom,
int  max_level,
TypeOneDRule  crule,
double  alpha,
double  beta 
)
inline

Load the cache.

Load max_level of cache for a rule given by crule. If the rule is not custom tabulated, then custom is not used (could be empty). Similarly, alpha and beta are used only by rules that use the corresponding transformation parameters.


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