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

A coarsening functor, removing points according to the minimal 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 <SurplusVolumeCoarseningFunctor.hpp>

Inheritance diagram for sgpp::base::SurplusVolumeCoarseningFunctor:

## 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...

SurplusVolumeCoarseningFunctor (DataVector &alpha, size_t removements_num=1, double threshold=0.0)
Constructor. More...

~SurplusVolumeCoarseningFunctor () 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...

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, 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

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

Constructor.

Parameters
 alpha DataVector that is basis for coarsening decisions. The i-th entry corresponds to the i-th grid point. removements_num Number of grid points which should be removed (if possible - there could be less removable grid points) threshold The absolute value of the entries have to be less or equal than the threshold to be considered for coarsening
 sgpp::base::SurplusVolumeCoarseningFunctor::~SurplusVolumeCoarseningFunctor ( )
override

Destructor.

## Member Function Documentation

 double sgpp::base::SurplusVolumeCoarseningFunctor::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.

 size_t sgpp::base::SurplusVolumeCoarseningFunctor::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.

 double sgpp::base::SurplusVolumeCoarseningFunctor::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
 storage reference to the grids storage object seq sequence number in the coefficients array
Returns
refinement value

Implements sgpp::base::CoarseningFunctor.

 double sgpp::base::SurplusVolumeCoarseningFunctor::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

 DataVector& sgpp::base::SurplusVolumeCoarseningFunctor::alpha
protected
 size_t sgpp::base::SurplusVolumeCoarseningFunctor::removements_num
protected

number of grid points to remove

Referenced by getRemovementsNum().

 double sgpp::base::SurplusVolumeCoarseningFunctor::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: