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

A refinement functor, refining according to the maximal absolute values in a DataVector provided, weighted with the corresponding basis function's surplus, i.e., with \(2^{-|\vec{l}|_1} = 2^{\sum_{k=1}^d l_d}\). More...

#include <SurplusVolumeRefinementFunctor.hpp>

Inheritance diagram for sgpp::base::SurplusVolumeRefinementFunctor:
sgpp::base::RefinementFunctor

Public Member Functions

size_t getRefinementsNum () const override
 Returns the maximal number of points that should be refined. More...
 
double getRefinementThreshold () const override
 Returns the threshold for refinement. More...
 
double operator() (GridStorage &storage, size_t seq) const override
 This should be returning a refinement value for every grid point. More...
 
double start () const override
 Returns the lower bound of refinement criterion (e.g., alpha or error) (lower bound). More...
 
 SurplusVolumeRefinementFunctor (DataVector &alpha, size_t refinements_num=1, double threshold=0.0)
 Constructor. More...
 
 ~SurplusVolumeRefinementFunctor () override
 Destructor. More...
 
- Public Member Functions inherited from sgpp::base::RefinementFunctor
virtual double getTotalRefinementValue (GridStorage &storage) const
 Returns the total sum of local (error) indicators used for refinement. More...
 
 RefinementFunctor ()
 Constructor. More...
 
virtual ~RefinementFunctor ()
 Destructor. More...
 

Protected Attributes

DataVectoralpha
 pointer to the vector that stores the alpha values More...
 
size_t refinements_num
 number of grid points to refine More...
 
double threshold
 threshold, only the points with greater to equal absolute values of the refinement criterion (e.g. More...
 

Additional Inherited Members

- Public Types inherited from sgpp::base::RefinementFunctor
typedef double value_type
 

Detailed Description

A refinement functor, refining according to the maximal absolute values in a DataVector provided, weighted with the corresponding basis function's surplus, i.e., with \(2^{-|\vec{l}|_1} = 2^{\sum_{k=1}^d l_d}\).

Constructor & Destructor Documentation

◆ SurplusVolumeRefinementFunctor()

sgpp::base::SurplusVolumeRefinementFunctor::SurplusVolumeRefinementFunctor ( DataVector alpha,
size_t  refinements_num = 1,
double  threshold = 0.0 
)

Constructor.

Parameters
alphaDataVector that is basis for refinement decisions. The i-th entry corresponds to the i-th grid point.
refinements_numNumber of grid points which should be refined (if possible - there could be less refinable grid points), default: 1
thresholdThe absolute value of the entries have to be greater or equal than the threshold, default: 0.0

◆ ~SurplusVolumeRefinementFunctor()

sgpp::base::SurplusVolumeRefinementFunctor::~SurplusVolumeRefinementFunctor ( )
override

Destructor.

Member Function Documentation

◆ getRefinementsNum()

size_t sgpp::base::SurplusVolumeRefinementFunctor::getRefinementsNum ( ) const
overridevirtual

Returns the maximal number of points that should be refined.

The maximal number of points to refine is set in the constructor of the implementing class.

Returns
number of points that should refined. Default value: 1.

Reimplemented from sgpp::base::RefinementFunctor.

References refinements_num.

◆ getRefinementThreshold()

double sgpp::base::SurplusVolumeRefinementFunctor::getRefinementThreshold ( ) const
overridevirtual

Returns the threshold for refinement.

Only the grid points with absolute value of refinement criterion (e.g., alpha or error) greater or equal to this threshold will be refined.

Returns
threshold value for refinement. Default value: 0.

Implements sgpp::base::RefinementFunctor.

References threshold.

◆ operator()()

double sgpp::base::SurplusVolumeRefinementFunctor::operator() ( GridStorage storage,
size_t  seq 
) const
overridevirtual

This should be returning a refinement value for every grid point.

The point with the highest value will be refined first.

Parameters
storagereference to the grids storage object
seqsequence number in the coefficients array
Returns
refinement value

Implements sgpp::base::RefinementFunctor.

References alpha, sgpp::base::HashGridPoint::getLevelSum(), sgpp::base::HashGridStorage::getPoint(), and sgpp::combigrid::pow().

◆ start()

double sgpp::base::SurplusVolumeRefinementFunctor::start ( ) const
overridevirtual

Returns the lower bound of refinement criterion (e.g., alpha or error) (lower bound).

The refinement value of grid points to be refined have to be larger than this value

Returns
lower bound

Implements sgpp::base::RefinementFunctor.

Member Data Documentation

◆ alpha

◆ refinements_num

size_t sgpp::base::SurplusVolumeRefinementFunctor::refinements_num
protected

number of grid points to refine

Referenced by getRefinementsNum().

◆ threshold

double sgpp::base::SurplusVolumeRefinementFunctor::threshold
protected

threshold, only the points with greater to equal absolute values of the refinement criterion (e.g.

alpha or error) will be refined

Referenced by getRefinementThreshold().


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