SG++-Doxygen-Documentation
Loading...
Searching...
No Matches
sgpp::base::HashCoarsening Class Reference

Standard free coarsening class for sparse grids, only inner grid points can be removed. More...

#include <HashCoarsening.hpp>

Public Member Functions

void free_coarsen (GridStorage &storage, CoarseningFunctor &functor, std::vector< HashGridPoint > *removedPoints=nullptr, std::vector< size_t > *removedSeq=nullptr)
 Performs coarsening on grid.
 
void free_coarsen_NFirstOnly (GridStorage &storage, CoarseningFunctor &functor, size_t numFirstPoints, size_t minIndexConsidered=0, std::vector< HashGridPoint > *removedPoints=nullptr, std::vector< size_t > *removedSeq=nullptr)
 Performs coarsening on grid.
 
size_t getNumberOfRemovablePoints (GridStorage &storage)
 Calculates the number of points, which can be refined.
 

Detailed Description

Standard free coarsening class for sparse grids, only inner grid points can be removed.

Member Function Documentation

◆ free_coarsen()

void sgpp::base::HashCoarsening::free_coarsen ( GridStorage storage,
CoarseningFunctor functor,
std::vector< HashGridPoint > *  removedPoints = nullptr,
std::vector< size_t > *  removedSeq = nullptr 
)

Performs coarsening on grid.

It's possible to remove a certain number of gridpoints in one coarsening step. This number is specified within the declaration of the coarsening functor. Also the coarsening threshold is specified in the coarsening functor. ONLY INNER GRID POINTS WILL BE REMOVED!

This function calls free_coarsen_NFirstOnly with numFirstPoints equal to the grid's size.

Note that seq numbers in removedSeq are invalid to use with the resulting grid after coarsening since the seq numbers get recomputed after removal. Use removedPoints unless outdated seq numbers are explicitly required.

Parameters
storagehashmap that stores the grid points
functora function used to determine if refinement is needed
removedPointspointer to vector to append coarsened (removed) grid points to
removedSeqpointer to vector to append the seq numbers of coarsened grid points to.

References free_coarsen_NFirstOnly(), and sgpp::base::HashGridStorage::getSize().

Referenced by sgpp::base::BoundaryGridGenerator::coarsen(), sgpp::base::L0BoundaryGridGenerator::coarsen(), sgpp::base::PrewaveletGridGenerator::coarsen(), sgpp::base::StandardGridGenerator::coarsen(), and sgpp::base::StretchedBoundaryGridGenerator::coarsen().

◆ free_coarsen_NFirstOnly()

void sgpp::base::HashCoarsening::free_coarsen_NFirstOnly ( GridStorage storage,
CoarseningFunctor functor,
size_t  numFirstPoints,
size_t  minIndexConsidered = 0,
std::vector< HashGridPoint > *  removedPoints = nullptr,
std::vector< size_t > *  removedSeq = nullptr 
)

Performs coarsening on grid.

It's possible to remove a certain number of gridpoints in one coarsening step. This number is specified within the declaration of the coarsening functor. Also the coarsening threshold is specified in the coarsening functor. ONLY INNER GRID POINTS WILL BE REMOVED!

Here only the numFirstPoints are regarded for coarsening, later points are skipped.

Note that seq numbers in removedSeq are invalid to use with the resulting grid after coarsening since the seq numbers get recomputed after removal. Use removedPoints unless outdated seq numbers are explicitly required.

Parameters
storagehashmap that stores the grid points
functora function used to determine if refinement is needed
numFirstPointsnumber of grid points that are regarded to be coarsened
minIndexConsideredindices of coarsen point candidates must be higher than this parameter to be allowed to get coarsened
removedPointspointer to vector to append coarsened (removed) grid points to
removedSeqpointer to vector to append the seq numbers of coarsened grid points to

References sgpp::base::HashGridStorage::deletePoints(), sgpp::base::CoarseningFunctor::getCoarseningThreshold(), sgpp::base::HashGridStorage::getPoint(), sgpp::base::CoarseningFunctor::getRemovementsNum(), sgpp::base::HashGridStorage::getSize(), and sgpp::base::CoarseningFunctor::start().

Referenced by sgpp::base::BoundaryGridGenerator::coarsenNFirstOnly(), sgpp::base::L0BoundaryGridGenerator::coarsenNFirstOnly(), sgpp::base::PrewaveletGridGenerator::coarsenNFirstOnly(), sgpp::base::StandardGridGenerator::coarsenNFirstOnly(), sgpp::base::StretchedBoundaryGridGenerator::coarsenNFirstOnly(), and free_coarsen().

◆ getNumberOfRemovablePoints()


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