SG++-Doxygen-Documentation
sgpp::base::BoundaryGridGenerator Class Reference

This class provides the interface for the grid generation for grids with boundaries, pentagon cut through sub space scheme. More...

#include <BoundaryGridGenerator.hpp>

Inheritance diagram for sgpp::base::BoundaryGridGenerator:
sgpp::base::GridGenerator

Public Member Functions

 BoundaryGridGenerator (GridStorage &storage, level_t boundaryLevel=1)
 Constructor. More...
 
void cliques (size_t level, size_t clique_size) override
 Creates a sparse grid with fully connected cliques. More...
 
void coarsen (CoarseningFunctor &func, DataVector &alpha) override
 Coarsens a grid according to the settings of the CoarseningFunctor func. More...
 
void coarsenNFirstOnly (CoarseningFunctor &func, DataVector &alpha, size_t numFirstOnly) override
 Coarsens a grid according to the settings of the CoarseningFunctor func. More...
 
void full (size_t level) override
 Creates a full grid for a certain level \( n \), i.e., \( V_n = \bigoplus_{|\vec{l}|_\infty *\leq n} W_{\vec{l}}\). More...
 
level_t getBoundaryLevel () const
 
size_t getNumberOfRefinablePoints () override
 Returns the number of points on the grid that can be refined in the next iteration. More...
 
size_t getNumberOfRefinablePointsToMaxLevel (size_t maxLevel) override
 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...
 
size_t getNumberOfRemovablePoints () override
 Returns the number of points on the grid that can be removed in the next iteration. More...
 
void refine (RefinementFunctor &func, std::vector< size_t > *addedPoints=0) override
 Refines a grid according to the settings of the RefinementFunctor func. More...
 
void refineMaxLevel (RefinementFunctor &func, size_t maxLevel) override
 Refines a grid according to the settings of the RefinementFunctor func. More...
 
void regular (size_t level) override
 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...
 
void setBoundaryLevel (level_t boundaryLevel)
 
 ~BoundaryGridGenerator () override
 Destructor. More...
 
- Public Member Functions inherited from sgpp::base::GridGenerator
virtual void cliques (size_t level, size_t clique_size, double T)
 Creates a sparse grid with fully connected cliques. More...
 
 GridGenerator ()
 Constructor. 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 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...
 

Protected Attributes

level_t boundaryLevel
 level at which the boundary points should be inserted More...
 
GridStoragestorage
 reference to the grid's storage object More...
 

Detailed Description

This class provides the interface for the grid generation for grids with boundaries, pentagon cut through sub space scheme.

Constructor & Destructor Documentation

◆ BoundaryGridGenerator()

sgpp::base::BoundaryGridGenerator::BoundaryGridGenerator ( GridStorage storage,
level_t  boundaryLevel = 1 
)
explicit

Constructor.

Parameters
storagetemplate type that holds the grid points
boundaryLevel1 + how much levels the boundary is coarser than the main axes, 0 means one level finer, 1 means same level, 2 means one level coarser, etc.

◆ ~BoundaryGridGenerator()

sgpp::base::BoundaryGridGenerator::~BoundaryGridGenerator ( )
override

Destructor.

Member Function Documentation

◆ cliques()

void sgpp::base::BoundaryGridGenerator::cliques ( size_t  level,
size_t  clique_size 
)
overridevirtual

Creates a sparse grid with fully connected cliques.

Parameters
levelGrid level
clique_sizeclique size

Implements sgpp::base::GridGenerator.

◆ coarsen()

void sgpp::base::BoundaryGridGenerator::coarsen ( CoarseningFunctor func,
DataVector alpha 
)
overridevirtual

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

Parameters
funcpointer to coarsening functor
alphaPointer to DataVector containing the grid's coefficients

Implements sgpp::base::GridGenerator.

References sgpp::base::HashCoarsening::free_coarsen(), and storage.

Referenced by coarsenNFirstOnly(), and getNumberOfRemovablePoints().

◆ coarsenNFirstOnly()

void sgpp::base::BoundaryGridGenerator::coarsenNFirstOnly ( CoarseningFunctor func,
DataVector alpha,
size_t  numFirstOnly 
)
overridevirtual

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

Implements sgpp::base::GridGenerator.

References coarsen(), sgpp::base::HashCoarsening::free_coarsen_NFirstOnly(), and storage.

◆ full()

void sgpp::base::BoundaryGridGenerator::full ( size_t  level)
overridevirtual

Creates a full grid for a certain level \( n \), i.e., \( V_n = \bigoplus_{|\vec{l}|_\infty *\leq n} W_{\vec{l}}\).

Parameters
levelGrid level

Implements sgpp::base::GridGenerator.

References sgpp::base::HashGenerator::fullWithBoundary(), and storage.

◆ getBoundaryLevel()

level_t sgpp::base::BoundaryGridGenerator::getBoundaryLevel ( ) const

References boundaryLevel.

◆ getNumberOfRefinablePoints()

size_t sgpp::base::BoundaryGridGenerator::getNumberOfRefinablePoints ( )
overridevirtual

Returns the number of points on the grid that can be refined in the next iteration.

Returns
the number of points on the grid that can be refined

Implements sgpp::base::GridGenerator.

References sgpp::base::HashRefinementBoundaries::getNumberOfRefinablePoints(), refine(), and storage.

◆ getNumberOfRefinablePointsToMaxLevel()

size_t sgpp::base::BoundaryGridGenerator::getNumberOfRefinablePointsToMaxLevel ( size_t  maxLevel)
overridevirtual

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

Implements sgpp::base::GridGenerator.

References sgpp::base::HashRefinementBoundariesMaxLevel::getNumberOfRefinablePointsToMaxLevel(), refine(), and storage.

◆ getNumberOfRemovablePoints()

size_t sgpp::base::BoundaryGridGenerator::getNumberOfRemovablePoints ( )
overridevirtual

Returns the number of points on the grid that can be removed in the next iteration.

Returns
the number of points on the grid that can be removed

Implements sgpp::base::GridGenerator.

References coarsen(), sgpp::base::HashCoarsening::getNumberOfRemovablePoints(), and storage.

◆ refine()

void sgpp::base::BoundaryGridGenerator::refine ( RefinementFunctor func,
std::vector< size_t > *  addedPoints = 0 
)
overridevirtual

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

Parameters
funcreference to refinement functor
addedPointspointer to vector to add newly created grid points to

Implements sgpp::base::GridGenerator.

References sgpp::base::HashRefinementBoundaries::free_refine(), and storage.

Referenced by getNumberOfRefinablePoints(), getNumberOfRefinablePointsToMaxLevel(), and refineMaxLevel().

◆ refineMaxLevel()

void sgpp::base::BoundaryGridGenerator::refineMaxLevel ( RefinementFunctor func,
size_t  maxLevel 
)
overridevirtual

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

additionally a maximum level for refinement is taken into account

Parameters
funcpointer to refinement functor
maxLevelno points on higher levels than maxLevel will be created

Implements sgpp::base::GridGenerator.

References refine(), sgpp::base::HashRefinementBoundariesMaxLevel::refineToMaxLevel(), and storage.

◆ regular()

void sgpp::base::BoundaryGridGenerator::regular ( size_t  level)
overridevirtual

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}}\).

Parameters
levelGrid level

Implements sgpp::base::GridGenerator.

References boundaryLevel, sgpp::base::HashGenerator::regularWithBoundaries(), and storage.

◆ setBoundaryLevel()

Member Data Documentation

◆ boundaryLevel

level_t sgpp::base::BoundaryGridGenerator::boundaryLevel
protected

level at which the boundary points should be inserted

Referenced by getBoundaryLevel(), regular(), and setBoundaryLevel().

◆ storage

GridStorage& sgpp::base::BoundaryGridGenerator::storage
protected

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