Doxygen 1.9.1
Toolkit for Adaptive Stochastic Modeling and Non-Intrusive ApproximatioN: Tasmanian v8.2 (development)
Greedy Sequences
Collaboration diagram for Greedy Sequences:

Classes

struct  TasGrid::Optimizer::OptimizerResult
 Simple pair of numbers for the node and the value of the functional at the node. More...
 
struct  TasGrid::Optimizer::CurrentNodes< TypeOneDRule >
 Data needed for the functional associated with the sequence rule, specialized for each case. More...
 
struct  TasGrid::Optimizer::CurrentNodes< rule_leja >
 Specialization for rule_leja, no need for coefficients. More...
 
struct  TasGrid::Optimizer::CurrentNodes< rule_mindeltaodd >
 Specialization for rule_mindeltaodd, requires two levels. More...
 
struct  TasGrid::Optimizer::HasDerivative< rule >
 Indicates whether a rule has associated derivative, most do. More...
 
struct  TasGrid::Optimizer::HasDerivative< rule_minlebesgue >
 Specialization for rule_minlebesgue which uses a min-max problem and cannot be differentiated. More...
 
struct  TasGrid::Optimizer::HasDerivative< rule_mindelta >
 Specialization for rule_mindelta which uses a min-max problem and cannot be differentiated. More...
 

Functions

template<TypeOneDRule rule>
double TasGrid::Optimizer::getNextNode (std::vector< double > const &nodes)
 For the given rule and set of nodes, compute the next node using the greedy procedure.
 
std::vector< double > TasGrid::Optimizer::getPrecomputedMinLebesgueNodes ()
 Get the hard-coded pre-computed nodes. More...
 
std::vector< double > TasGrid::Optimizer::getPrecomputedMinDeltaNodes ()
 Get the hard-coded pre-computed nodes. More...
 
template<TypeOneDRule rule>
std::vector< double > TasGrid::Optimizer::getGreedyNodes (int n)
 Get n nodes for the given sequence rule, either compute or use pre-computed.
 
std::vector< double > TasGrid::Optimizer::makeCoefficients (std::vector< double > const &nodes)
 Computes the coefficients needed for fast evaluation of the Lagrange polynomials.
 
std::vector< double > TasGrid::Optimizer::evalLagrange (std::vector< double > const &nodes, std::vector< double > const &coeffs, double x)
 Computes the values of the Lagrange polynomials at x, used in most functionals.
 
double TasGrid::Optimizer::differentiateBasis (std::vector< double > const &nodes, std::vector< double > const &coeffs, size_t inode, double x)
 Computes the derivative of the inode basis functions at x.
 
template<TypeOneDRule rule>
double TasGrid::Optimizer::getValue (CurrentNodes< rule > const &, double)
 Computes the value of the functional for given x, specialized for each sequence.
 
template<TypeOneDRule rule>
double TasGrid::Optimizer::getDerivative (CurrentNodes< rule > const &, double)
 Computes the derivative of the functional for given x, specialized for each sequence with HasDerivative<rule>::value = true.
 
template<TypeOneDRule rule>
OptimizerResult TasGrid::Optimizer::performSecantSearch (CurrentNodes< rule > const &current, double left, double right)
 Uses the secant method to find local maximum of the functional of the current nodes, uses left and right as starting points. More...
 
template<TypeOneDRule rule>
OptimizerResult TasGrid::Optimizer::computeLocalMaximum (CurrentNodes< rule > const &current, double left_node, double right_node)
 Finds the maximum of the functional of the current nodes in the interval between left_node and right_node. More...
 
template<TypeOneDRule rule>
OptimizerResult TasGrid::Optimizer::computeMaximum (CurrentNodes< rule > const &current)
 Finds the maximum of the functional over the interval (-1, 1). More...
 
template<>
double TasGrid::Optimizer::getValue< rule_leja > (CurrentNodes< rule_leja > const &current, double x)
 The rule_leja functional.
 
template<>
double TasGrid::Optimizer::getValue< rule_maxlebesgue > (CurrentNodes< rule_maxlebesgue > const &current, double x)
 The rule_maxlebesgue functional.
 
template<>
double TasGrid::Optimizer::getValue< rule_mindeltaodd > (CurrentNodes< rule_mindeltaodd > const &current, double x)
 The rule_mindeltaodd functional (indicates companion to rule_mindelta for the min-max problem).
 
template<>
double TasGrid::Optimizer::getValue< rule_minlebesgue > (CurrentNodes< rule_minlebesgue > const &current, double x)
 The rule_minlebesgue functional, uses the rule_maxlebesgue functions in min-max problem.
 
template<>
double TasGrid::Optimizer::getValue< rule_mindelta > (CurrentNodes< rule_mindelta > const &current, double x)
 The rule_mindelta functional, uses the rule_mindeltaodd functions in min-max problem.
 
template<>
double TasGrid::Optimizer::getDerivative< rule_leja > (CurrentNodes< rule_leja > const &current, double x)
 The derivative of the rule_leja functional.
 
template<>
double TasGrid::Optimizer::getDerivative< rule_maxlebesgue > (CurrentNodes< rule_maxlebesgue > const &current, double x)
 The derivative of the rule_maxlebesgue functional.
 
template<>
double TasGrid::Optimizer::getDerivative< rule_mindeltaodd > (CurrentNodes< rule_mindeltaodd > const &current, double x)
 The derivative of the rule_mindeltaodd functional.
 

Detailed Description

Sequence One Dimensional Rules
Nested rules that grow with one point per level allow great flexibility in constructing sparse grids; however, controlling the Lebesgue constant for such sequences is a challenge. The standard way to construct a sequence is to follow a greedy optimization problem, start with a few initial nodes (usually 0, 1, -1) then add new nodes at the maximum of a specific functional. Thus, nodes are computed one at a time and one-dimensional optimization algorithms are needed.

Function Documentation

◆ getPrecomputedMinLebesgueNodes()

std::vector< double > TasGrid::Optimizer::getPrecomputedMinLebesgueNodes ( )

Get the hard-coded pre-computed nodes.

Some nodes are very expensive to compute, thus we store a pre-computed set that contains enough nodes for most applications.

◆ getPrecomputedMinDeltaNodes()

std::vector< double > TasGrid::Optimizer::getPrecomputedMinDeltaNodes ( )

Get the hard-coded pre-computed nodes.

Some nodes are very expensive to compute, thus we store a pre-computed set that contains enough nodes for most applications.

◆ performSecantSearch()

template<TypeOneDRule rule>
OptimizerResult TasGrid::Optimizer::performSecantSearch ( CurrentNodes< rule > const &  current,
double  left,
double  right 
)

Uses the secant method to find local maximum of the functional of the current nodes, uses left and right as starting points.

Uses the secant method to find the zero of the derivative of the functional associated with the rule. The method converges fast but may converge to the wrong answer if the initial guess is not close to the zero. When called from computeLocalMaximum(), the result of a coarse pattern search is used as initial guess.

◆ computeLocalMaximum()

template<TypeOneDRule rule>
OptimizerResult TasGrid::Optimizer::computeLocalMaximum ( CurrentNodes< rule > const &  current,
double  left_node,
double  right_node 
)

Finds the maximum of the functional of the current nodes in the interval between left_node and right_node.

Uses pattern search with simple left, middle, and right points. If the functional of the rule is differentiable, then the pattern search is used as an initial guess to secant optimization method.

◆ computeMaximum()

template<TypeOneDRule rule>
OptimizerResult TasGrid::Optimizer::computeMaximum ( CurrentNodes< rule > const &  current)

Finds the maximum of the functional over the interval (-1, 1).

Given the current set of nodes, construct the functional for the given rule and perform a local optimization on every interval, i.e., compute the local maximum between every two adjacent nodes in current. The work in done in parallel and the global maximum is reported as the largest among the local maximums.