SG++
sgpp::base::GridGenerator Class Referenceabstract

Abstract class that defines the interfaces for the different grid's GridGenerators. More...

#include <GridGenerator.hpp>

Inheritance diagram for sgpp::base::GridGenerator:
sgpp::base::BoundaryGridGenerator sgpp::base::GeneralizedBoundaryGridGenerator sgpp::base::L0BoundaryGridGenerator sgpp::base::PeriodicGridGenerator sgpp::base::PrewaveletGridGenerator sgpp::base::SquareRootGridGenerator sgpp::base::StandardGridGenerator sgpp::base::StretchedBoundaryGridGenerator

Public Member Functions

virtual void cliques (size_t level, size_t clique_size)=0
 Creates a sparse grid with fully connected cliques. More...
 
virtual void cliques (size_t level, size_t clique_size, double T)
 Creates a sparse grid with fully connected cliques. More...
 
virtual void coarsen (CoarseningFunctor &func, DataVector &alpha)=0
 Coarsens a grid according to the settings of the CoarseningFunctor func. More...
 
virtual void coarsenNFirstOnly (CoarseningFunctor &func, DataVector &alpha, size_t numFirstOnly)=0
 Coarsens a grid according to the settings of the CoarseningFunctor func. More...
 
virtual void full (size_t level)=0
 Creates a full grid for a certain level \( n \), i.e., \( V_n = \bigoplus_{|\vec{l}|_\infty *\leq n} W_{\vec{l}}\). More...
 
virtual size_t getNumberOfRefinablePoints ()=0
 Returns the number of points on the grid that can be refined in the next iteration. More...
 
virtual size_t getNumberOfRefinablePointsToMaxLevel (size_t maxLevel)=0
 Returns the number of points on the grid that can be refined in the next iteration additionally a maximum level for refinement is taken into account. More...
 
virtual size_t getNumberOfRemovablePoints ()=0
 Returns the number of points on the grid that can be removed in the next iteration. More...
 
 GridGenerator ()
 Constructor. More...
 
virtual void refine (RefinementFunctor &func)=0
 Refines a grid according to the settings of the RefinementFunctor func. More...
 
virtual void refineInter (RefinementFunctor &func, const std::vector< std::vector< size_t >> &interactions)
 Refines a grid according to the settings of the RefinementFunctor func. More...
 
virtual void refineMaxLevel (RefinementFunctor &func, size_t maxLevel)=0
 Refines a grid according to the settings of the RefinementFunctor func. More...
 
virtual void regular (size_t level)=0
 Creates a regular sparse grid for a certain level \( n \), i.e., \( V_n^{(1)} = *\bigoplus_{|\vec{l}|_1 \leq n+d-1} W_{\vec{l}}\). More...
 
virtual void regular (size_t level, double T)
 Creates a regular sparse grid for a certain level \( n \), i.e., \( V_n^{(1)} = *\bigoplus_{|\vec{l}|_1 \leq n+d-1} W_{\vec{l}}\). More...
 
virtual void regularInter (size_t level, const std::vector< std::vector< size_t >> &terms, double T)
 Creates a regular sparse grid for a certain level \( n \), i.e., \( V_n^{(1)} = *\bigoplus_{|\vec{l}|_1 \leq n+d-1} W_{\vec{l}}\). More...
 
virtual void truncated (size_t level, size_t l_user)
 Creates a grid which doesn't contain the fullgrids with li<l_user, for any li level_t. More...
 
virtual ~GridGenerator ()
 Destructor. More...
 

Detailed Description

Abstract class that defines the interfaces for the different grid's GridGenerators.

Constructor & Destructor Documentation

sgpp::base::GridGenerator::GridGenerator ( )
inline

Constructor.

virtual sgpp::base::GridGenerator::~GridGenerator ( )
inlinevirtual

Destructor.

References level, and regular().

Member Function Documentation

virtual void sgpp::base::GridGenerator::cliques ( size_t  level,
size_t  clique_size 
)
pure virtual
virtual void sgpp::base::GridGenerator::cliques ( size_t  level,
size_t  clique_size,
double  T 
)
inlinevirtual

Creates a sparse grid with fully connected cliques.

Parameters
levelGrid level
clique_sizeclique size
Tmodifier for subgrid selection, T = 0 implies standard sparse grid. For further information see Griebel and Knapek's paper optimized tensor-product approximation spaces

Reimplemented in sgpp::base::PrewaveletGridGenerator, sgpp::base::StandardGridGenerator, and sgpp::base::PeriodicGridGenerator.

References full().

virtual void sgpp::base::GridGenerator::coarsen ( CoarseningFunctor func,
DataVector alpha 
)
pure virtual
virtual void sgpp::base::GridGenerator::coarsenNFirstOnly ( CoarseningFunctor func,
DataVector alpha,
size_t  numFirstOnly 
)
pure virtual

Coarsens a grid according to the settings of the CoarseningFunctor func.

Only numFirstOnly first grid points are checked for coarsening.

Parameters
funcpointer to coarsening functor
alphaPointer to DataVector containing the grid's coefficients
numFirstOnlymax. number grid points to be coarsened

Implemented in sgpp::base::PrewaveletGridGenerator, sgpp::base::GeneralizedBoundaryGridGenerator, sgpp::base::BoundaryGridGenerator, sgpp::base::StandardGridGenerator, sgpp::base::PeriodicGridGenerator, sgpp::base::SquareRootGridGenerator, sgpp::base::L0BoundaryGridGenerator, and sgpp::base::StretchedBoundaryGridGenerator.

Referenced by sgpp::pde::PDESolver::coarsenInitialGridSurplus(), and refineInter().

virtual void sgpp::base::GridGenerator::full ( size_t  level)
pure virtual
virtual size_t sgpp::base::GridGenerator::getNumberOfRefinablePoints ( )
pure virtual
virtual size_t sgpp::base::GridGenerator::getNumberOfRefinablePointsToMaxLevel ( size_t  maxLevel)
pure virtual

Returns the number of points on the grid that can be refined in the next iteration additionally a maximum level for refinement is taken into account.

Parameters
maxLevelno points on higher levels than maxLevel will be created
Returns
the number of points on the grid that can be refined

Implemented in sgpp::base::PrewaveletGridGenerator, sgpp::base::GeneralizedBoundaryGridGenerator, sgpp::base::BoundaryGridGenerator, sgpp::base::StandardGridGenerator, sgpp::base::SquareRootGridGenerator, sgpp::base::PeriodicGridGenerator, sgpp::base::L0BoundaryGridGenerator, and sgpp::base::StretchedBoundaryGridGenerator.

Referenced by sgpp::pde::PDESolver::refineInitialGridSurplusToMaxLevel(), sgpp::pde::PDESolver::refineInitialGridSurplusToMaxLevelSubDomain(), and refineInter().

virtual size_t sgpp::base::GridGenerator::getNumberOfRemovablePoints ( )
pure virtual
virtual void sgpp::base::GridGenerator::refineInter ( RefinementFunctor func,
const std::vector< std::vector< size_t >> &  interactions 
)
inlinevirtual

Refines a grid according to the settings of the RefinementFunctor func.

Does not create any interactions, that are not in the list of allowed interactions.

Refines the grid, but only adds interactions that are contained in the set interactions, i.e. only desired interactions. Each desired interaction is encoded as a vector which contains all desired interactions. For example, if we want to include grid points that model an interaction between the first and the second predictor, we would include the vector [1,2] in interactions.

Parameters
funcpointer to refinement functor
interactionsallowed interactions

Reimplemented in sgpp::base::StandardGridGenerator.

References alpha, coarsen(), coarsenNFirstOnly(), getNumberOfRefinablePoints(), getNumberOfRefinablePointsToMaxLevel(), getNumberOfRemovablePoints(), and refineMaxLevel().

virtual void sgpp::base::GridGenerator::refineMaxLevel ( RefinementFunctor func,
size_t  maxLevel 
)
pure virtual
virtual void sgpp::base::GridGenerator::regular ( size_t  level,
double  T 
)
inlinevirtual

Creates a regular sparse grid for a certain level \( n \), i.e., \( V_n^{(1)} = *\bigoplus_{|\vec{l}|_1 \leq n+d-1} W_{\vec{l}}\).

If the used grid doesn't support the parameter t, t = 0 is used instead.

Parameters
levelGrid level
Tmodifier for subgrid selection, T = 0 implies standard sparse grid. For further information see Griebel and Knapek's paper optimized tensor-product approximation spaces

Reimplemented in sgpp::base::PrewaveletGridGenerator, sgpp::base::StandardGridGenerator, and sgpp::base::PeriodicGridGenerator.

virtual void sgpp::base::GridGenerator::regularInter ( size_t  level,
const std::vector< std::vector< size_t >> &  terms,
double  T 
)
inlinevirtual

Creates a regular sparse grid for a certain level \( n \), i.e., \( V_n^{(1)} = *\bigoplus_{|\vec{l}|_1 \leq n+d-1} W_{\vec{l}}\).

If the used grid doesn't support the parameter t, t = 0 is used instead. This grid generator allows the creation of regular grids that only contain some interaction terms.

Parameters
levelGrid level
Tmodifier for subgrid selection, T = 0 implies standard sparse grid. For further information see Griebel and Knapek's paper optimized tensor-product approximation spaces
termsdetermines the included interaction terms.

Reimplemented in sgpp::base::StandardGridGenerator.

References cliques().

virtual void sgpp::base::GridGenerator::truncated ( size_t  level,
size_t  l_user 
)
inlinevirtual

Creates a grid which doesn't contain the fullgrids with li<l_user, for any li level_t.

Reimplemented in sgpp::base::GeneralizedBoundaryGridGenerator.

References refine().


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