SG++-Doxygen-Documentation
|
#include <CombigridTensorOperation.hpp>
Public Member Functions | |
CombigridTensorOperation (std::vector< std::shared_ptr< AbstractPointHierarchy >> pointHierarchies, std::vector< std::shared_ptr< AbstractLinearEvaluator< FloatTensorVector >>> evaluatorPrototypes, std::shared_ptr< LevelManager > levelManager, MultiFunction func, bool exploitNesting=true, FullGridSummationStrategyType summationStrategyType=FullGridSummationStrategyType::LINEAR, std::shared_ptr< NormStrategy< FloatTensorVector >> normStrategy=nullptr) | |
Constructs a CombigridTensorOperation with the given hierarchies, evaluators, level manager and function to evaluate. More... | |
CombigridTensorOperation (std::vector< std::shared_ptr< AbstractPointHierarchy >> pointHierarchies, std::vector< std::shared_ptr< AbstractLinearEvaluator< FloatTensorVector >>> evaluatorPrototypes, std::shared_ptr< LevelManager > levelManager, std::shared_ptr< AbstractCombigridStorage > storage, FullGridSummationStrategyType summationStrategyType=FullGridSummationStrategyType::LINEAR, std::shared_ptr< NormStrategy< FloatTensorVector >> normStrategy=nullptr) | |
Constructs a CombigridTensorOperation with the given hierarchies, evaluators, level manager and CombigridStorage that contains the function to evaluate. More... | |
CombigridTensorOperation (std::vector< std::shared_ptr< AbstractPointHierarchy >> pointHierarchies, std::vector< std::shared_ptr< AbstractLinearEvaluator< FloatTensorVector >>> evaluatorPrototypes, std::shared_ptr< LevelManager > levelManager, GridFunction gridFunc, bool exploitNesting, FullGridSummationStrategyType summationStrategyType=FullGridSummationStrategyType::LINEAR, std::shared_ptr< NormStrategy< FloatTensorVector >> normStrategy=nullptr) | |
Constructs a CombigridTensorOperation with the given hierarchies, evaluators, level manager and grid function together with the information whether the same point on different levels should be able to have different function values. More... | |
FloatTensorVector | evaluate (size_t q, std::vector< FloatTensorVector > const ¶ms=std::vector< FloatTensorVector >()) |
Computes the result with regular levels up to 1-norm q (levels start from zero) and with parameter params. More... | |
std::shared_ptr< AbstractMultiStorage< FloatTensorVector > > | getDifferences () |
Returns a storage of the differences (Deltas) that have been computed by the CombigridEvaluator. More... | |
std::shared_ptr< LevelManager > | getLevelManager () |
Via the LevelManager, more options are available than are provided directly by this class. More... | |
std::vector< std::shared_ptr< AbstractPointHierarchy > > | getPointHierarchies () |
FloatTensorVector | getResult () |
Returns the current computed value. More... | |
std::shared_ptr< AbstractCombigridStorage > | getStorage () |
size_t | getUpperPointBound () const |
size_t | numDims () |
size_t | numGridPoints () |
size_t | numStoredFunctionValues () |
void | setLevelManager (std::shared_ptr< LevelManager > levelManager) |
Can be used to set the level manager, e.g. More... | |
void | setParameters (std::vector< FloatTensorVector > const ¶ms) |
Sets the parameters for upcoming computations and clears the data structures (removes old computed data). More... | |
Static Public Member Functions | |
static std::shared_ptr< CombigridTensorOperation > | createExpChebyshevPolynomialInterpolation (std::shared_ptr< AbstractInfiniteFunctionBasis1D > functionBasis, size_t numDimensions, MultiFunction func) |
Returns a CombigridTensorOperation doing polynomial interpolation on a Chebyshev grid with an exponential growth (nested points). More... | |
static std::shared_ptr< CombigridTensorOperation > | createExpClenshawCurtisPolynomialInterpolation (std::shared_ptr< AbstractInfiniteFunctionBasis1D > functionBasis, size_t numDimensions, MultiFunction func) |
Returns a CombigridTensorOperation doing polynomial interpolation on a Clenshaw-Curtis grid with an exponential growth (nested points). More... | |
static std::shared_ptr< CombigridTensorOperation > | createExpL2LejaPolynomialInterpolation (std::shared_ptr< AbstractInfiniteFunctionBasis1D > functionBasis, size_t numDimensions, MultiFunction func) |
Returns a CombigridTensorOperation doing polynomial interpolation on a L2Leja grid with an exponential growth (nested points). More... | |
static std::shared_ptr< CombigridTensorOperation > | createExpLejaPolynomialInterpolation (std::shared_ptr< AbstractInfiniteFunctionBasis1D > functionBasis, size_t numDimensions, MultiFunction func) |
Returns a CombigridTensorOperation doing polynomial interpolation on a Leja grid with an exponential growth (nested points). More... | |
static std::shared_ptr< CombigridTensorOperation > | createExpUniformBoundaryBSplineInterpolation (size_t numDimensions, MultiFunction func, size_t degree) |
static std::shared_ptr< CombigridTensorOperation > | createLinearClenshawCurtisPolynomialInterpolation (std::shared_ptr< AbstractInfiniteFunctionBasis1D > functionBasis, size_t numDimensions, MultiFunction func) |
Returns a CombigridTensorOperation doing polynomial interpolation on a Clenshaw-Curtis grid with a linear growth (not nested points). More... | |
static std::shared_ptr< CombigridTensorOperation > | createLinearL2LejaPolynomialInterpolation (std::shared_ptr< AbstractInfiniteFunctionBasis1D > functionBasis, size_t numDimensions, MultiFunction func, size_t growthFactor=2) |
Returns a CombigridTensorOperation doing polynomial interpolation on a L2Leja grid with linear growth (nested points). More... | |
static std::shared_ptr< CombigridTensorOperation > | createLinearLejaPolynomialInterpolation (std::shared_ptr< AbstractInfiniteFunctionBasis1D > functionBasis, size_t numDimensions, MultiFunction func, size_t growthFactor=2) |
Returns a CombigridTensorOperation doing polynomial interpolation on a Leja grid with linear growth (nested points). More... | |
static std::shared_ptr< CombigridTensorOperation > | createOperationTensorBSplineInterpolation (std::vector< std::shared_ptr< AbstractPointHierarchy >> pointHierarchies, std::shared_ptr< AbstractCombigridStorage > storage, std::shared_ptr< LevelManager > levelManager, FullGridSummationStrategyType summationStrategyType=FullGridSummationStrategyType::LINEAR) |
Transforms the basic structures of an arbitrary operation to a tensor operation. More... | |
static std::shared_ptr< CombigridTensorOperation > | createOperationTensorPolynomialInterpolation (std::vector< std::shared_ptr< AbstractPointHierarchy >> pointHierarchies, std::shared_ptr< AbstractCombigridStorage > storage, std::shared_ptr< AbstractInfiniteFunctionBasis1D > functionBasis, FullGridSummationStrategyType summationStrategyType=FullGridSummationStrategyType::LINEAR) |
Transforms the basic structures of an arbitrary operation to a tensor operation. More... | |
static std::shared_ptr< CombigridTensorOperation > | createOperationTensorPolynomialInterpolation (std::vector< std::shared_ptr< AbstractPointHierarchy >> pointHierarchies, std::shared_ptr< AbstractCombigridStorage > storage, OrthogonalBasisFunctionsCollection &functionBases, FullGridSummationStrategyType summationStrategyType=FullGridSummationStrategyType::LINEAR) |
Transforms the basic structures of an arbitrary operation to a tensor operation. More... | |
sgpp::combigrid::CombigridTensorOperation::CombigridTensorOperation | ( | std::vector< std::shared_ptr< AbstractPointHierarchy >> | pointHierarchies, |
std::vector< std::shared_ptr< AbstractLinearEvaluator< FloatTensorVector >>> | evaluatorPrototypes, | ||
std::shared_ptr< LevelManager > | levelManager, | ||
MultiFunction | func, | ||
bool | exploitNesting = true , |
||
FullGridSummationStrategyType | summationStrategyType = FullGridSummationStrategyType::LINEAR , |
||
std::shared_ptr< NormStrategy< FloatTensorVector >> | normStrategy = nullptr |
||
) |
Constructs a CombigridTensorOperation with the given hierarchies, evaluators, level manager and function to evaluate.
References sgpp::combigrid::CombigridTensorOperationImpl::levelManager, and sgpp::combigrid::CombigridTensorOperationImpl::pointHierarchies.
sgpp::combigrid::CombigridTensorOperation::CombigridTensorOperation | ( | std::vector< std::shared_ptr< AbstractPointHierarchy >> | pointHierarchies, |
std::vector< std::shared_ptr< AbstractLinearEvaluator< FloatTensorVector >>> | evaluatorPrototypes, | ||
std::shared_ptr< LevelManager > | levelManager, | ||
std::shared_ptr< AbstractCombigridStorage > | storage, | ||
FullGridSummationStrategyType | summationStrategyType = FullGridSummationStrategyType::LINEAR , |
||
std::shared_ptr< NormStrategy< FloatTensorVector >> | normStrategy = nullptr |
||
) |
Constructs a CombigridTensorOperation with the given hierarchies, evaluators, level manager and CombigridStorage that contains the function to evaluate.
References sgpp::combigrid::CombigridTensorOperationImpl::levelManager, sgpp::combigrid::CombigridTensorOperationImpl::pointHierarchies, and sgpp::combigrid::CombigridTensorOperationImpl::storage.
sgpp::combigrid::CombigridTensorOperation::CombigridTensorOperation | ( | std::vector< std::shared_ptr< AbstractPointHierarchy >> | pointHierarchies, |
std::vector< std::shared_ptr< AbstractLinearEvaluator< FloatTensorVector >>> | evaluatorPrototypes, | ||
std::shared_ptr< LevelManager > | levelManager, | ||
GridFunction | gridFunc, | ||
bool | exploitNesting, | ||
FullGridSummationStrategyType | summationStrategyType = FullGridSummationStrategyType::LINEAR , |
||
std::shared_ptr< NormStrategy< FloatTensorVector >> | normStrategy = nullptr |
||
) |
Constructs a CombigridTensorOperation with the given hierarchies, evaluators, level manager and grid function together with the information whether the same point on different levels should be able to have different function values.
References sgpp::combigrid::CombigridTensorOperationImpl::levelManager, and sgpp::combigrid::CombigridTensorOperationImpl::pointHierarchies.
|
static |
Returns a CombigridTensorOperation doing polynomial interpolation on a Chebyshev grid with an exponential growth (nested points).
functionBasis | global basis to which the result should be transformed |
numDimensions | Dimensionality of the problem. |
func | Function to be interpolated. |
References sgpp::combigrid::CombiHierarchies::expChebyshev(), and sgpp::combigrid::CombiEvaluators::tensorInterpolation().
|
static |
Returns a CombigridTensorOperation doing polynomial interpolation on a Clenshaw-Curtis grid with an exponential growth (nested points).
functionBasis | global basis to which the result should be transformed |
numDimensions | Dimensionality of the problem. |
func | Function to be interpolated. |
References sgpp::combigrid::CombiHierarchies::expClenshawCurtis(), and sgpp::combigrid::CombiEvaluators::tensorInterpolation().
|
static |
Returns a CombigridTensorOperation doing polynomial interpolation on a L2Leja grid with an exponential growth (nested points).
functionBasis | global basis to which the result should be transformed |
numDimensions | Dimensionality of the problem. |
func | Function to be interpolated. |
References sgpp::combigrid::CombiHierarchies::expL2Leja(), and sgpp::combigrid::CombiEvaluators::tensorInterpolation().
|
static |
Returns a CombigridTensorOperation doing polynomial interpolation on a Leja grid with an exponential growth (nested points).
functionBasis | global basis to which the result should be transformed |
numDimensions | Dimensionality of the problem. |
func | Function to be interpolated. |
References sgpp::combigrid::CombiHierarchies::expLeja(), and sgpp::combigrid::CombiEvaluators::tensorInterpolation().
|
static |
References BSplineTensorCoefficientGridFunction(), sgpp::combigrid::CombiHierarchies::expUniformBoundary(), sgpp::combigrid::CombigridTensorOperationImpl::levelManager, sgpp::combigrid::CombigridTensorOperationImpl::pointHierarchies, and sgpp::combigrid::CombiEvaluators::tensorBSplineInterpolation().
|
static |
Returns a CombigridTensorOperation doing polynomial interpolation on a Clenshaw-Curtis grid with a linear growth (not nested points).
functionBasis | global basis to which the result should be transformed |
numDimensions | Dimensionality of the problem. |
func | Function to be interpolated. |
References sgpp::combigrid::CombiEvaluators::tensorInterpolation().
|
static |
Returns a CombigridTensorOperation doing polynomial interpolation on a L2Leja grid with linear growth (nested points).
functionBasis | global basis to which the result should be transformed |
numDimensions | Dimensionality of the problem. |
func | Function to be interpolated. |
growthFactor | Parameter for the linear growth strategy. For level l, 1 + growthFactor * l points are used. |
References sgpp::combigrid::CombiHierarchies::linearL2Leja(), and sgpp::combigrid::CombiEvaluators::tensorInterpolation().
|
static |
Returns a CombigridTensorOperation doing polynomial interpolation on a Leja grid with linear growth (nested points).
functionBasis | global basis to which the result should be transformed |
numDimensions | Dimensionality of the problem. |
func | Function to be interpolated. |
growthFactor | Parameter for the linear growth strategy. For level l, 1 + growthFactor * l points are used. |
References sgpp::combigrid::CombiHierarchies::linearLeja(), and sgpp::combigrid::CombiEvaluators::tensorInterpolation().
|
static |
Transforms the basic structures of an arbitrary operation to a tensor operation.
pointHierarchies | univariate grids |
storage | function value storage |
levelManager | provides level structures that are copied to the new tensor operation |
summationStrategyType | strategy to gather the results of the univariate evaluators on |
References python.statsfileInfo::i, sgpp::combigrid::CombigridTensorOperationImpl::pointHierarchies, and sgpp::combigrid::CombiEvaluators::tensorBSplineInterpolation().
|
static |
Transforms the basic structures of an arbitrary operation to a tensor operation.
pointHierarchies | univariate grids |
storage | function value storage |
functionBasis | global basis function to which the result should be transformed |
summationStrategyType | strategy to gather the results of the univariate evaluators on |
References sgpp::combigrid::CombigridTensorOperationImpl::pointHierarchies, and sgpp::combigrid::CombiEvaluators::tensorInterpolation().
Referenced by sgpp::combigrid::PolynomialChaosExpansion::updateConfig(), and sgpp::combigrid::PolynomialStochasticCollocation::updateConfig().
|
static |
Transforms the basic structures of an arbitrary operation to a tensor operation.
pointHierarchies | univariate grids |
storage | function value storage |
functionBases | vector of global basis functions to which the result should be transformed |
summationStrategyType | strategy to gather the results of the univariate evaluators on |
References python.statsfileInfo::i, sgpp::combigrid::CombigridTensorOperationImpl::pointHierarchies, sgpp::combigrid::OrthogonalBasisFunctionsCollection::size(), and sgpp::combigrid::CombiEvaluators::tensorInterpolation().
FloatTensorVector sgpp::combigrid::CombigridTensorOperation::evaluate | ( | size_t | q, |
std::vector< FloatTensorVector > const & | params = std::vector<FloatTensorVector>() |
||
) |
Computes the result with regular levels up to 1-norm q (levels start from zero) and with parameter params.
This is a convenience function. If you need other functionality, use getLevelManager() and operate directly on the LevelManager.
std::shared_ptr< AbstractMultiStorage< FloatTensorVector > > sgpp::combigrid::CombigridTensorOperation::getDifferences | ( | ) |
Returns a storage of the differences (Deltas) that have been computed by the CombigridEvaluator.
std::shared_ptr< LevelManager > sgpp::combigrid::CombigridTensorOperation::getLevelManager | ( | ) |
Via the LevelManager, more options are available than are provided directly by this class.
std::vector< std::shared_ptr< AbstractPointHierarchy > > sgpp::combigrid::CombigridTensorOperation::getPointHierarchies | ( | ) |
FloatTensorVector sgpp::combigrid::CombigridTensorOperation::getResult | ( | ) |
Returns the current computed value.
Referenced by python.uq.uq_setting.UQSetting.UQSetting::getTimeDependentResults().
std::shared_ptr< AbstractCombigridStorage > sgpp::combigrid::CombigridTensorOperation::getStorage | ( | ) |
size_t sgpp::combigrid::CombigridTensorOperation::getUpperPointBound | ( | ) | const |
size_t sgpp::combigrid::CombigridTensorOperation::numDims | ( | ) |
size_t sgpp::combigrid::CombigridTensorOperation::numGridPoints | ( | ) |
size_t sgpp::combigrid::CombigridTensorOperation::numStoredFunctionValues | ( | ) |
void sgpp::combigrid::CombigridTensorOperation::setLevelManager | ( | std::shared_ptr< LevelManager > | levelManager | ) |
Can be used to set the level manager, e.g.
if one of the static constructor functions has been used.
References sgpp::combigrid::CombigridTensorOperationImpl::levelManager.
void sgpp::combigrid::CombigridTensorOperation::setParameters | ( | std::vector< FloatTensorVector > const & | params | ) |
Sets the parameters for upcoming computations and clears the data structures (removes old computed data).
This is only relevant for methods with parameters.
params | The parameters at which the function should be evaluated. |