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

A coarsening functor, removing points according to the minimal absolute values in a DataVector provided. More...

#include <SurplusCoarseningFunctor.hpp>

Inheritance diagram for sgpp::base::SurplusCoarseningFunctor:
sgpp::base::CoarseningFunctor

Public Member Functions

double getCoarseningThreshold () const override
 Returns the threshold value. More...
 
size_t getRemovementsNum () const override
 Returns the maximal number of points that should be removed. More...
 
double operator() (GridStorage &storage, size_t seq) override
 This should be returning a coarsening value for every grid point. More...
 
double start () const override
 This should return the initial value of coarsening criterion (e.g. More...
 
 SurplusCoarseningFunctor (DataVector &alpha, size_t removements_num=1, double threshold=0.0)
 Constructor. More...
 
 ~SurplusCoarseningFunctor () override
 Destructor. More...
 
- Public Member Functions inherited from sgpp::base::CoarseningFunctor
 CoarseningFunctor ()
 Constructor. More...
 
virtual ~CoarseningFunctor ()
 Destructor. More...
 

Protected Attributes

DataVectoralpha
 pointer to the vector that stores the alpha values More...
 
size_t removements_num
 number of grid points to remove 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::CoarseningFunctor
typedef double value_type
 

Detailed Description

A coarsening functor, removing points according to the minimal absolute values in a DataVector provided.

Constructor & Destructor Documentation

◆ SurplusCoarseningFunctor()

sgpp::base::SurplusCoarseningFunctor::SurplusCoarseningFunctor ( DataVector alpha,
size_t  removements_num = 1,
double  threshold = 0.0 
)

Constructor.

Parameters
alphaDataVector that is basis for coarsening decisions. The i-th entry corresponds to the i-th grid point.
removements_numNumber of grid points which should be removed (if possible - there could be less removable grid points)
thresholdThe absolute value of the entries have to be less or equal than the threshold to be considered for coarsening

◆ ~SurplusCoarseningFunctor()

sgpp::base::SurplusCoarseningFunctor::~SurplusCoarseningFunctor ( )
override

Destructor.

Member Function Documentation

◆ getCoarseningThreshold()

double sgpp::base::SurplusCoarseningFunctor::getCoarseningThreshold ( ) const
overridevirtual

Returns the threshold value.

Only the grid points with absolute value of coarsening criterion (e.g. alpha) less or equal to this threshold will be removed

Returns
threshold value for refinement. Default value: 0.

Implements sgpp::base::CoarseningFunctor.

References threshold.

◆ getRemovementsNum()

size_t sgpp::base::SurplusCoarseningFunctor::getRemovementsNum ( ) const
overridevirtual

Returns the maximal number of points that should be removed.

The maximal number of points to removed is set in the constructor of implementation class.

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

Reimplemented from sgpp::base::CoarseningFunctor.

References removements_num.

◆ operator()()

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

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

The point with the lowest value will be removed first.

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

Implements sgpp::base::CoarseningFunctor.

References alpha.

◆ start()

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

This should return the initial value of coarsening criterion (e.g.

alpha or error).

Returns
the initial value

Implements sgpp::base::CoarseningFunctor.

Member Data Documentation

◆ alpha

◆ removements_num

size_t sgpp::base::SurplusCoarseningFunctor::removements_num
protected

number of grid points to remove

Referenced by getRemovementsNum().

◆ threshold

double sgpp::base::SurplusCoarseningFunctor::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 getCoarseningThreshold().


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