SG++-Doxygen-Documentation
Loading...
Searching...
No Matches
sgpp::base::PolyBasis< LT, IT > Class Template Reference

Polynomial basis functions. More...

#include <PolyBasis.hpp>

Inheritance diagram for sgpp::base::PolyBasis< LT, IT >:
sgpp::base::Basis< LT, IT >

Public Member Functions

double eval (LT level, IT index, double p) override
 Evaluate the basis function with given level and index.
 
double evalBasis (LT level, IT index, double p)
 Evaluate a basis function.
 
double evalDx (LT level, IT index, double x) override
 Evaluate the basis functions derivative with given level and index.
 
double evalHierToTop (LT level, IT index, DataVector &coeffs, double pos)
 Evaluates all the hierarchical ancestors of the node defined by level and index.
 
size_t getDegree () const override
 Returns the polynomial degree of the basis.
 
double getIntegral (LT level, IT index) override
 returns the integal of the current basis function
 
 PolyBasis (size_t degree)
 Constructor.
 
 ~PolyBasis () override
 Destructor.
 
- Public Member Functions inherited from sgpp::base::Basis< LT, IT >
virtual ~Basis ()
 Destructor.
 

Protected Attributes

size_t degree
 the polynom's max degree
 
std::vector< int > idxtable
 

Detailed Description

template<class LT, class IT>
class sgpp::base::PolyBasis< LT, IT >

Polynomial basis functions.

Version
$HEAD$

Constructor & Destructor Documentation

◆ PolyBasis()

template<class LT , class IT >
sgpp::base::PolyBasis< LT, IT >::PolyBasis ( size_t  degree)
inlineexplicit

Constructor.

Parameters
degreethe polynom's max. degree

References sgpp::base::PolyBasis< LT, IT >::degree, and sgpp::base::PolyBasis< LT, IT >::idxtable.

◆ ~PolyBasis()

template<class LT , class IT >
sgpp::base::PolyBasis< LT, IT >::~PolyBasis ( )
inlineoverride

Destructor.

Member Function Documentation

◆ eval()

◆ evalBasis()

template<class LT , class IT >
double sgpp::base::PolyBasis< LT, IT >::evalBasis ( LT  level,
IT  index,
double  p 
)
inline

Evaluate a basis function.

Has a dependence on the absolute position of grid point and support.

We compute the roots in units of h = grid spacing at level l = 2 ** -l.

Due to limited polynomial degree, we compute the roots of the Lagrange polynomial bottom up.

References sgpp::base::PolyBasis< LT, IT >::degree, sgpp::base::PolyBasis< LT, IT >::eval(), sgpp::base::PolyBasis< LT, IT >::idxtable, and level.

Referenced by sgpp::base::PolyBasis< LT, IT >::eval().

◆ evalDx()

template<class LT , class IT >
double sgpp::base::PolyBasis< LT, IT >::evalDx ( LT  level,
IT  index,
double  x 
)
inlineoverridevirtual

Evaluate the basis functions derivative with given level and index.

Parameters
levellevel of the basis function
indexindex of the basis function
xevaluation point
Returns
value of the basis functions derivative.

Implements sgpp::base::Basis< LT, IT >.

References sgpp::base::PolyBasis< LT, IT >::degree, sgpp::base::PolyBasis< LT, IT >::eval(), h, sgpp::base::PolyBasis< LT, IT >::idxtable, and level.

Referenced by sgpp::base::PolyBoundaryBasis< LT, IT >::evalDx(), sgpp::base::PolyModifiedBasis< LT, IT >::evalDx(), and sgpp::pde::OperationLaplacePoly::mult().

◆ evalHierToTop()

template<class LT , class IT >
double sgpp::base::PolyBasis< LT, IT >::evalHierToTop ( LT  level,
IT  index,
DataVector coeffs,
double  pos 
)
inline

Evaluates all the hierarchical ancestors of the node defined by level and index.

NOTE: It does not evaluate the current node itself.

Parameters
level
index
coeffs
pos
Returns

References sgpp::base::PolyBasis< LT, IT >::eval(), and level.

Referenced by sgpp::base::DehierarchisationPoly::rec(), and sgpp::base::HierarchisationPoly::rec().

◆ getDegree()

template<class LT , class IT >
size_t sgpp::base::PolyBasis< LT, IT >::getDegree ( ) const
inlineoverridevirtual

Returns the polynomial degree of the basis.

Returns
polynomial degree of the basis

Implements sgpp::base::Basis< LT, IT >.

References sgpp::base::PolyBasis< LT, IT >::degree.

Referenced by sgpp::base::PolyBoundaryBasis< LT, IT >::getDegree(), and sgpp::base::PolyModifiedBasis< LT, IT >::getDegree().

◆ getIntegral()

template<class LT , class IT >
double sgpp::base::PolyBasis< LT, IT >::getIntegral ( LT  level,
IT  index 
)
inlineoverridevirtual

Member Data Documentation

◆ degree

◆ idxtable

template<class LT , class IT >
std::vector<int> sgpp::base::PolyBasis< LT, IT >::idxtable
protected

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