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

A refinement functor, refining according to the maximal absolute values in a DataVector provided. More...

#include <SurplusRefinementFunctor.hpp>

Inheritance diagram for sgpp::base::SurplusRefinementFunctor:
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...
 
 SurplusRefinementFunctor (DataVector &alpha, size_t refinements_num=1, double threshold=0.0)
 Constructor. More...
 
 ~SurplusRefinementFunctor () 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.

Constructor & Destructor Documentation

◆ SurplusRefinementFunctor()

sgpp::base::SurplusRefinementFunctor::SurplusRefinementFunctor ( 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)
thresholdThe absolute value of the entries have to be greater or equal than the threshold

◆ ~SurplusRefinementFunctor()

sgpp::base::SurplusRefinementFunctor::~SurplusRefinementFunctor ( )
override

Destructor.

Member Function Documentation

◆ getRefinementsNum()

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

◆ start()

double sgpp::base::SurplusRefinementFunctor::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::SurplusRefinementFunctor::refinements_num
protected

number of grid points to refine

Referenced by getRefinementsNum().

◆ threshold

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