HyperHDG
Static Public Member Functions | List of all members
TPP::ShapeType::Legendre< poly_deg > Struct Template Reference

Struct that handles the evaluation of one-dimensional Legendre polynomials. More...

#include <one_dimensional.hxx>

Static Public Member Functions

static constexpr unsigned int n_fun ()
 Number of shape functions that span the local polynomial space. More...
 
static constexpr unsigned int dim ()
 Dimension of abscissas of the polynomials. More...
 
static constexpr unsigned int degree ()
 Maximum degree of all polynomials. More...
 
template<typename return_t , typename input_t >
static constexpr return_t clenshaw_alpha (const unsigned int k, const input_t &x)
 Evaluate variable alpha of the Clenshaw algorithm. More...
 
template<typename return_t , typename input_t >
static constexpr return_t clenshaw_beta (const unsigned int k, const input_t &)
 Evaluate variable beta of the Clenshaw algorithm. More...
 
template<typename return_t , typename input_t >
static constexpr return_t clenshaw_b (const unsigned int k, const unsigned int n, const input_t &x)
 Evaluate variable b of the Clenshaw algorithm. More...
 
template<typename return_t , typename input_t >
static constexpr return_t fct_val (const unsigned int index, const input_t &x_val, const bool normalized=true)
 Evaluate value of one shape function. More...
 
template<typename return_t , typename input_t >
static constexpr return_t der_val (const unsigned int index, const input_t &x_val, const bool normalized=true)
 Evaluate value of the derivative of orthonormal shape function. More...
 

Detailed Description

template<unsigned int poly_deg>
struct TPP::ShapeType::Legendre< poly_deg >

Struct that handles the evaluation of one-dimensional Legendre polynomials.


We use Clenshaw's algorithm (cf. https://en.wikipedia.org/wiki/Clenshaw_algorithm; date: Jan. 09, 2021) to evaluate the three-term recusion formula defining Legendre polynomials as defined on https://en.wikipedia.org/wiki/Legendre_polynomials; date Jan. 09, 2021).

The shape functions in this struct, however, are defined with respect to the unit interval [0,1] and normalized to be L^2 orthonormal (not just orthogonal).

Template Parameters
poly_degThe maximum degree of the polynomial.
Authors
Andreas Rupp, Heidelberg University, 2021.

Member Function Documentation

◆ clenshaw_alpha()

template<unsigned int poly_deg>
template<typename return_t , typename input_t >
static constexpr return_t TPP::ShapeType::Legendre< poly_deg >::clenshaw_alpha ( const unsigned int  k,
const input_t &  x 
)
inlinestaticconstexpr

Evaluate variable alpha of the Clenshaw algorithm.


◆ clenshaw_b()

template<unsigned int poly_deg>
template<typename return_t , typename input_t >
static constexpr return_t TPP::ShapeType::Legendre< poly_deg >::clenshaw_b ( const unsigned int  k,
const unsigned int  n,
const input_t &  x 
)
inlinestaticconstexpr

Evaluate variable b of the Clenshaw algorithm.


◆ clenshaw_beta()

template<unsigned int poly_deg>
template<typename return_t , typename input_t >
static constexpr return_t TPP::ShapeType::Legendre< poly_deg >::clenshaw_beta ( const unsigned int  k,
const input_t &   
)
inlinestaticconstexpr

Evaluate variable beta of the Clenshaw algorithm.


◆ degree()

template<unsigned int poly_deg>
static constexpr unsigned int TPP::ShapeType::Legendre< poly_deg >::degree ( )
inlinestaticconstexpr

Maximum degree of all polynomials.


◆ der_val()

template<unsigned int poly_deg>
template<typename return_t , typename input_t >
static constexpr return_t TPP::ShapeType::Legendre< poly_deg >::der_val ( const unsigned int  index,
const input_t &  x_val,
const bool  normalized = true 
)
inlinestaticconstexpr

Evaluate value of the derivative of orthonormal shape function.


Evaluates the value of the derivative of the index orthonormal, one-dimensional shape function on the reference interval \([0,1]\) at abscissa x_val.

Template Parameters
return_tFloating type specification for return value.
input_tFloating type specification for input value.
Parameters
indexIndex of evaluated shape function.
x_valAbscissa of evaluated shape function.
normalizedDecide whether L^2 normalization is conducted. Defaults to true.
Return values
fct_valueEvaluated value of shape function's derivative.
Here is the call graph for this function:

◆ dim()

template<unsigned int poly_deg>
static constexpr unsigned int TPP::ShapeType::Legendre< poly_deg >::dim ( )
inlinestaticconstexpr

Dimension of abscissas of the polynomials.


◆ fct_val()

template<unsigned int poly_deg>
template<typename return_t , typename input_t >
static constexpr return_t TPP::ShapeType::Legendre< poly_deg >::fct_val ( const unsigned int  index,
const input_t &  x_val,
const bool  normalized = true 
)
inlinestaticconstexpr

Evaluate value of one shape function.


Evaluates value of the index one-dimensional shape function on the reference interval \([0,1]\) at abscissas x_val.

Template Parameters
return_tFloating type specification for return value.
input_tFloating type specification for input value.
Parameters
indexIndex of evaluated shape function.
x_valAbscissa of evaluated shape function.
normalizedDecide whether L^2 normalization is conducted. Defaults to true.
Return values
fct_valueEvaluated value of shape function.
Here is the call graph for this function:

◆ n_fun()

template<unsigned int poly_deg>
static constexpr unsigned int TPP::ShapeType::Legendre< poly_deg >::n_fun ( )
inlinestaticconstexpr

Number of shape functions that span the local polynomial space.


Here is the call graph for this function:

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