HyperHDG
Static Public Member Functions | Static Private Member Functions | List of all members
TPP::Quadrature::GaussLegendre< quad_deg > Class Template Reference

Gauss–Legendre quadrature points and weights in one spatial dimension. More...

#include <one_dimensional.hxx>

Static Public Member Functions

static constexpr unsigned int n_points ()
 Calculate the amount of quadrature points at compile time. More...
 
template<typename return_t = double>
static constexpr std::array< return_t, n_points()> points ()
 Gauss–Legendre quadrature points on one-dimensional unit interval. More...
 
template<typename return_t = double>
static constexpr std::array< return_t, n_points()> weights ()
 Gauss–Legendre quadrature weights on one-dimensional unit interval. More...
 

Static Private Member Functions

template<typename return_t >
static constexpr std::array< return_t, n_points()> transform_points (std::array< return_t, n_points()> points)
 Transform array of quadrature points in interval \([-1,1]\) to \([0,1]\). More...
 
template<typename return_t >
static constexpr std::array< return_t, n_points()> transform_weights (std::array< return_t, n_points()> weights)
 Transform array of quadrature weights for interval \([-1,1]\) to \([0,1]\). More...
 

Detailed Description

template<unsigned int quad_deg>
class TPP::Quadrature::GaussLegendre< quad_deg >

Gauss–Legendre quadrature points and weights in one spatial dimension.


Template Parameters
quad_degDesired degree of accuracy.
Authors
Andreas Rupp, Heidelberg University, 2021.

Member Function Documentation

◆ n_points()

template<unsigned int quad_deg>
static constexpr unsigned int TPP::Quadrature::GaussLegendre< quad_deg >::n_points ( )
inlinestaticconstexpr

Calculate the amount of quadrature points at compile time.


Naive implementation to calculate the amount of needed quadrature points if a rule of accuracy quad_deg is desired in one dimension.

Return values
n_quad_pointsAmount of needed quadrature points.

◆ points()

template<unsigned int quad_deg>
template<typename return_t = double>
static constexpr std::array<return_t, n_points()> TPP::Quadrature::GaussLegendre< quad_deg >::points ( )
inlinestaticconstexpr

Gauss–Legendre quadrature points on one-dimensional unit interval.


Returns the quadrature points of the quadrature rule with accuracy order quad_deg on the one-dimensional unit interval \([0,1]\).

Template Parameters
return_tFloating type specification. Default is double.
Return values
quad_pointsstd::array containing the quadrature points.
Here is the call graph for this function:

◆ transform_points()

template<unsigned int quad_deg>
template<typename return_t >
static constexpr std::array<return_t, n_points()> TPP::Quadrature::GaussLegendre< quad_deg >::transform_points ( std::array< return_t, n_points()>  points)
inlinestaticconstexprprivate

Transform array of quadrature points in interval \([-1,1]\) to \([0,1]\).


Here is the call graph for this function:

◆ transform_weights()

template<unsigned int quad_deg>
template<typename return_t >
static constexpr std::array<return_t, n_points()> TPP::Quadrature::GaussLegendre< quad_deg >::transform_weights ( std::array< return_t, n_points()>  weights)
inlinestaticconstexprprivate

Transform array of quadrature weights for interval \([-1,1]\) to \([0,1]\).


Here is the call graph for this function:

◆ weights()

template<unsigned int quad_deg>
template<typename return_t = double>
static constexpr std::array<return_t, n_points()> TPP::Quadrature::GaussLegendre< quad_deg >::weights ( )
inlinestaticconstexpr

Gauss–Legendre quadrature weights on one-dimensional unit interval.


Returns the quadrature weights of the quadrature rule with accuracy order quad_deg on the one-dimensional unit interval \([0,1]\).

Template Parameters
return_tFloating type specification. Default is double.
Return values
quad_weightsstd::array containing the quadrature weights.
Here is the call graph for this function:

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