SG++-Doxygen-Documentation
sgpp::combigrid::CombigridOperation Class Reference

Interface class for simple usage of the combigrid module. More...

#include <CombigridOperation.hpp>

Public Member Functions

 CombigridOperation (std::vector< std::shared_ptr< AbstractPointHierarchy >> pointHierarchies, std::vector< std::shared_ptr< AbstractLinearEvaluator< FloatScalarVector >>> evaluatorPrototypes, std::shared_ptr< LevelManager > levelManager, MultiFunction func, bool exploitNesting=true, FullGridSummationStrategyType summationStrategyType=FullGridSummationStrategyType::LINEAR, std::shared_ptr< NormStrategy< FloatScalarVector >> normStrategy=nullptr)
 
 CombigridOperation (std::vector< std::shared_ptr< AbstractPointHierarchy >> pointHierarchies, std::vector< std::shared_ptr< AbstractLinearEvaluator< FloatScalarVector >>> evaluatorPrototypes, std::shared_ptr< LevelManager > levelManager, std::shared_ptr< AbstractCombigridStorage > storage, FullGridSummationStrategyType summationStrategyType=FullGridSummationStrategyType::LINEAR, std::shared_ptr< NormStrategy< FloatScalarVector >> normStrategy=nullptr)
 
 CombigridOperation (std::vector< std::shared_ptr< AbstractPointHierarchy >> pointHierarchies, std::vector< std::shared_ptr< AbstractLinearEvaluator< FloatScalarVector >>> evaluatorPrototypes, std::shared_ptr< LevelManager > levelManager, GridFunction gridFunc, bool exploitNesting=true, FullGridSummationStrategyType summationStrategyType=FullGridSummationStrategyType::LINEAR, std::shared_ptr< NormStrategy< FloatScalarVector >> normStrategy=nullptr)
 
double evaluate (size_t q, base::DataVector const &param=base::DataVector(0))
 
std::shared_ptr< AbstractFullGridEvaluator< FloatScalarVector > > getFullGridEval ()
 
std::shared_ptr< LevelManagergetLevelManager ()
 
std::vector< std::shared_ptr< AbstractPointHierarchy > > getPointHierarchies ()
 
double getResult ()
 
std::shared_ptr< AbstractCombigridStoragegetStorage ()
 
size_t getUpperPointBound () const
 
size_t numDims ()
 
size_t numGridPoints ()
 
size_t numStoredFunctionValues ()
 
void setLevelManager (std::shared_ptr< LevelManager > levelManager)
 
void setParameters (base::DataVector const &param=base::DataVector(0))
 
void setStorage (std::shared_ptr< AbstractCombigridStorage > storage)
 

Static Public Member Functions

static std::shared_ptr< CombigridOperationauxiliaryBsplineFunction (size_t numDimensions, MultiFunction func, sgpp::combigrid::CombiHierarchies::Collection grids, sgpp::combigrid::CombiEvaluators::Collection evaluators, size_t degree)
 
static std::shared_ptr< CombigridOperationcreateExpChebyshevBsplineInterpolation (size_t numDimensions, MultiFunction func, size_t degree)
 
static std::shared_ptr< CombigridOperationcreateExpChebyshevPolynomialInterpolation (size_t numDimensions, MultiFunction func)
 
static std::shared_ptr< CombigridOperationcreateExpClenshawCurtisBsplineInterpolation (size_t numDimensions, MultiFunction func, size_t degree)
 
static std::shared_ptr< CombigridOperationcreateExpClenshawCurtisPolynomialInterpolation (size_t numDimensions, MultiFunction func)
 
static std::shared_ptr< CombigridOperationcreateExpClenshawCurtisQuadrature (size_t numDimensions, MultiFunction func)
 
static std::shared_ptr< CombigridOperationcreateExpL2LejaPolynomialInterpolation (size_t numDimensions, MultiFunction func)
 
static std::shared_ptr< CombigridOperationcreateExpLejaPolynomialInterpolation (size_t numDimensions, MultiFunction func)
 
static std::shared_ptr< CombigridOperationcreateExpUniformBoundaryBsplineInterpolation (size_t numDimensions, MultiFunction func, size_t degree)
 
static std::shared_ptr< CombigridOperationcreateExpUniformBoundaryBsplineQuadrature (size_t numDimensions, MultiFunction func, size_t degree)
 
static std::shared_ptr< CombigridOperationcreateExpUniformBoundaryLinearInterpolation (size_t numDimensions, MultiFunction func)
 
static std::shared_ptr< CombigridOperationcreateExpUniformBoundaryPolynomialInterpolation (size_t numDimensions, MultiFunction func)
 
static std::shared_ptr< CombigridOperationcreateExpUniformLinearInterpolation (size_t numDimensions, MultiFunction func)
 
static std::shared_ptr< CombigridOperationcreateExpUniformPolynomialInterpolation (size_t numDimensions, MultiFunction func)
 
static std::shared_ptr< CombigridOperationcreateLinearClenshawCurtisPolynomialInterpolation (size_t numDimensions, MultiFunction func)
 
static std::shared_ptr< CombigridOperationcreateLinearL2LejaBsplineInterpolation (size_t numDimensions, MultiFunction func, size_t degree, size_t growthFactor)
 
static std::shared_ptr< CombigridOperationcreateLinearL2LejaPolynomialInterpolation (size_t numDimensions, MultiFunction func, size_t growthFactor=2)
 
static std::shared_ptr< CombigridOperationcreateLinearL2LejaQuadrature (size_t numDimensions, MultiFunction func, size_t growthFactor=2)
 
static std::shared_ptr< CombigridOperationcreateLinearLejaBsplineInterpolation (size_t numDimensions, MultiFunction func, size_t degree, size_t growthFactor)
 
static std::shared_ptr< CombigridOperationcreateLinearLejaPolynomialInterpolation (size_t numDimensions, MultiFunction func, size_t growthFactor=2)
 
static std::shared_ptr< CombigridOperationcreateLinearLejaQuadrature (size_t numDimensions, MultiFunction func, size_t growthFactor=2)
 
static std::shared_ptr< CombigridOperationcreateLinearUniformBoundaryPolynomialInterpolation (size_t numDimensions, MultiFunction func)
 
static std::shared_ptr< CombigridOperationcreateLinearUniformPolynomialInterpolation (size_t numDimensions, MultiFunction func)
 

Detailed Description

Interface class for simple usage of the combigrid module.

Via a CombigridOperation, the evaluation (interpolation at a single point or quadrature) of the computation pipeline can be easily managed. There are two main ways to create this class:

  • The point hierarchies and evaluators etc. are created by the user and passed to the constructor
  • One of the static methods is used. They provide some sensible isotropic configurations.

Via the LevelManager, which can be get and set, one can control which adaptivity criterion might be used. For easy evaluation, there is an evaluate()-method, which does all the work at once and generates a regular level structure. To get more control over the level structure, one may proceed as follows:

For method documentation, please refer to CombigridMultiOperation.

Constructor & Destructor Documentation

◆ CombigridOperation() [1/3]

sgpp::combigrid::CombigridOperation::CombigridOperation ( std::vector< std::shared_ptr< AbstractPointHierarchy >>  pointHierarchies,
std::vector< std::shared_ptr< AbstractLinearEvaluator< FloatScalarVector >>>  evaluatorPrototypes,
std::shared_ptr< LevelManager levelManager,
MultiFunction  func,
bool  exploitNesting = true,
FullGridSummationStrategyType  summationStrategyType = FullGridSummationStrategyType::LINEAR,
std::shared_ptr< NormStrategy< FloatScalarVector >>  normStrategy = nullptr 
)

◆ CombigridOperation() [2/3]

sgpp::combigrid::CombigridOperation::CombigridOperation ( std::vector< std::shared_ptr< AbstractPointHierarchy >>  pointHierarchies,
std::vector< std::shared_ptr< AbstractLinearEvaluator< FloatScalarVector >>>  evaluatorPrototypes,
std::shared_ptr< LevelManager levelManager,
std::shared_ptr< AbstractCombigridStorage storage,
FullGridSummationStrategyType  summationStrategyType = FullGridSummationStrategyType::LINEAR,
std::shared_ptr< NormStrategy< FloatScalarVector >>  normStrategy = nullptr 
)

◆ CombigridOperation() [3/3]

sgpp::combigrid::CombigridOperation::CombigridOperation ( std::vector< std::shared_ptr< AbstractPointHierarchy >>  pointHierarchies,
std::vector< std::shared_ptr< AbstractLinearEvaluator< FloatScalarVector >>>  evaluatorPrototypes,
std::shared_ptr< LevelManager levelManager,
GridFunction  gridFunc,
bool  exploitNesting = true,
FullGridSummationStrategyType  summationStrategyType = FullGridSummationStrategyType::LINEAR,
std::shared_ptr< NormStrategy< FloatScalarVector >>  normStrategy = nullptr 
)

Member Function Documentation

◆ auxiliaryBsplineFunction()

std::shared_ptr< CombigridOperation > sgpp::combigrid::CombigridOperation::auxiliaryBsplineFunction ( size_t  numDimensions,
MultiFunction  func,
sgpp::combigrid::CombiHierarchies::Collection  grids,
sgpp::combigrid::CombiEvaluators::Collection  evaluators,
size_t  degree 
)
static

◆ createExpChebyshevBsplineInterpolation()

std::shared_ptr< CombigridOperation > sgpp::combigrid::CombigridOperation::createExpChebyshevBsplineInterpolation ( size_t  numDimensions,
MultiFunction  func,
size_t  degree = 3 
)
static

◆ createExpChebyshevPolynomialInterpolation()

std::shared_ptr< CombigridOperation > sgpp::combigrid::CombigridOperation::createExpChebyshevPolynomialInterpolation ( size_t  numDimensions,
MultiFunction  func 
)
static

◆ createExpClenshawCurtisBsplineInterpolation()

std::shared_ptr< CombigridOperation > sgpp::combigrid::CombigridOperation::createExpClenshawCurtisBsplineInterpolation ( size_t  numDimensions,
MultiFunction  func,
size_t  degree = 3 
)
static

◆ createExpClenshawCurtisPolynomialInterpolation()

std::shared_ptr< CombigridOperation > sgpp::combigrid::CombigridOperation::createExpClenshawCurtisPolynomialInterpolation ( size_t  numDimensions,
MultiFunction  func 
)
static

◆ createExpClenshawCurtisQuadrature()

std::shared_ptr< CombigridOperation > sgpp::combigrid::CombigridOperation::createExpClenshawCurtisQuadrature ( size_t  numDimensions,
MultiFunction  func 
)
static

◆ createExpL2LejaPolynomialInterpolation()

std::shared_ptr< CombigridOperation > sgpp::combigrid::CombigridOperation::createExpL2LejaPolynomialInterpolation ( size_t  numDimensions,
MultiFunction  func 
)
static

◆ createExpLejaPolynomialInterpolation()

std::shared_ptr< CombigridOperation > sgpp::combigrid::CombigridOperation::createExpLejaPolynomialInterpolation ( size_t  numDimensions,
MultiFunction  func 
)
static

◆ createExpUniformBoundaryBsplineInterpolation()

std::shared_ptr< CombigridOperation > sgpp::combigrid::CombigridOperation::createExpUniformBoundaryBsplineInterpolation ( size_t  numDimensions,
MultiFunction  func,
size_t  degree = 3 
)
static

◆ createExpUniformBoundaryBsplineQuadrature()

std::shared_ptr< CombigridOperation > sgpp::combigrid::CombigridOperation::createExpUniformBoundaryBsplineQuadrature ( size_t  numDimensions,
MultiFunction  func,
size_t  degree = 3 
)
static

◆ createExpUniformBoundaryLinearInterpolation()

std::shared_ptr< CombigridOperation > sgpp::combigrid::CombigridOperation::createExpUniformBoundaryLinearInterpolation ( size_t  numDimensions,
MultiFunction  func 
)
static

◆ createExpUniformBoundaryPolynomialInterpolation()

std::shared_ptr< CombigridOperation > sgpp::combigrid::CombigridOperation::createExpUniformBoundaryPolynomialInterpolation ( size_t  numDimensions,
MultiFunction  func 
)
static

◆ createExpUniformLinearInterpolation()

std::shared_ptr< CombigridOperation > sgpp::combigrid::CombigridOperation::createExpUniformLinearInterpolation ( size_t  numDimensions,
MultiFunction  func 
)
static

◆ createExpUniformPolynomialInterpolation()

std::shared_ptr< CombigridOperation > sgpp::combigrid::CombigridOperation::createExpUniformPolynomialInterpolation ( size_t  numDimensions,
MultiFunction  func 
)
static

◆ createLinearClenshawCurtisPolynomialInterpolation()

std::shared_ptr< CombigridOperation > sgpp::combigrid::CombigridOperation::createLinearClenshawCurtisPolynomialInterpolation ( size_t  numDimensions,
MultiFunction  func 
)
static

◆ createLinearL2LejaBsplineInterpolation()

std::shared_ptr< CombigridOperation > sgpp::combigrid::CombigridOperation::createLinearL2LejaBsplineInterpolation ( size_t  numDimensions,
MultiFunction  func,
size_t  degree = 3,
size_t  growthFactor = 2 
)
static

◆ createLinearL2LejaPolynomialInterpolation()

std::shared_ptr< CombigridOperation > sgpp::combigrid::CombigridOperation::createLinearL2LejaPolynomialInterpolation ( size_t  numDimensions,
MultiFunction  func,
size_t  growthFactor = 2 
)
static

◆ createLinearL2LejaQuadrature()

std::shared_ptr< CombigridOperation > sgpp::combigrid::CombigridOperation::createLinearL2LejaQuadrature ( size_t  numDimensions,
MultiFunction  func,
size_t  growthFactor = 2 
)
static

◆ createLinearLejaBsplineInterpolation()

std::shared_ptr< CombigridOperation > sgpp::combigrid::CombigridOperation::createLinearLejaBsplineInterpolation ( size_t  numDimensions,
MultiFunction  func,
size_t  degree = 3,
size_t  growthFactor = 2 
)
static

◆ createLinearLejaPolynomialInterpolation()

std::shared_ptr< CombigridOperation > sgpp::combigrid::CombigridOperation::createLinearLejaPolynomialInterpolation ( size_t  numDimensions,
MultiFunction  func,
size_t  growthFactor = 2 
)
static

◆ createLinearLejaQuadrature()

std::shared_ptr< CombigridOperation > sgpp::combigrid::CombigridOperation::createLinearLejaQuadrature ( size_t  numDimensions,
MultiFunction  func,
size_t  growthFactor = 2 
)
static

◆ createLinearUniformBoundaryPolynomialInterpolation()

std::shared_ptr< CombigridOperation > sgpp::combigrid::CombigridOperation::createLinearUniformBoundaryPolynomialInterpolation ( size_t  numDimensions,
MultiFunction  func 
)
static

◆ createLinearUniformPolynomialInterpolation()

std::shared_ptr< CombigridOperation > sgpp::combigrid::CombigridOperation::createLinearUniformPolynomialInterpolation ( size_t  numDimensions,
MultiFunction  func 
)
static

◆ evaluate()

double sgpp::combigrid::CombigridOperation::evaluate ( size_t  q,
base::DataVector const &  param = base::DataVector(0) 
)

◆ getFullGridEval()

std::shared_ptr< AbstractFullGridEvaluator< FloatScalarVector > > sgpp::combigrid::CombigridOperation::getFullGridEval ( )
Returns
the evaluator prototypes in each direction

◆ getLevelManager()

std::shared_ptr< LevelManager > sgpp::combigrid::CombigridOperation::getLevelManager ( )

◆ getPointHierarchies()

std::vector< std::shared_ptr< AbstractPointHierarchy > > sgpp::combigrid::CombigridOperation::getPointHierarchies ( )
Returns
the point hierarchies containing the grid points in each direction

◆ getResult()

double sgpp::combigrid::CombigridOperation::getResult ( )

◆ getStorage()

std::shared_ptr< AbstractCombigridStorage > sgpp::combigrid::CombigridOperation::getStorage ( )
Returns
the storage containing the computed function values at evaluation points.

◆ getUpperPointBound()

size_t sgpp::combigrid::CombigridOperation::getUpperPointBound ( ) const
Returns
An upper bound for the number of points (function evaluations) used for the current computation. This bound is exact if nesting is used or if otherwise each grid point only occurs in exactly one level.

◆ numDims()

size_t sgpp::combigrid::CombigridOperation::numDims ( )
Returns
the number of dimensions

◆ numGridPoints()

size_t sgpp::combigrid::CombigridOperation::numGridPoints ( )
Returns
the total number of different (multi-dimensional) grid points that have been used for the current evaluation. This number is reset when clear() is called on the CombigridEvaluator via evaluate() or setParameters(). This method is currently not optimized and can be slow!

◆ numStoredFunctionValues()

size_t sgpp::combigrid::CombigridOperation::numStoredFunctionValues ( )
Returns
the number of function values that have been computed via this CombigridOperation during its lifetime. For a nested grid, this number matches numGridPoints() if only one computation is performed, i.e. no previous data has been cleared via evaluate() or setParameters(). Its computation is not optimized, but currently faster than numGridPoints().

◆ setLevelManager()

void sgpp::combigrid::CombigridOperation::setLevelManager ( std::shared_ptr< LevelManager levelManager)

◆ setParameters()

void sgpp::combigrid::CombigridOperation::setParameters ( base::DataVector const &  param = base::DataVector(0))

◆ setStorage()

void sgpp::combigrid::CombigridOperation::setStorage ( std::shared_ptr< AbstractCombigridStorage storage)
Parameters
storagethe storage containing the coefficients precalculated by some other operation

References sgpp::combigrid::CombigridOperationImpl::storage.


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