PTEMS  0.1.0-dev+git.81fd0e4
PolyTopic Element Method Solver
ptems::LagrangePolynomials< 1 > Struct Reference

Defines Lagrange polynomials in the 1D reference element (the interval \(4[-1.1]\)) More...

#include <ptems/spaces/lagrangepolynomials.hpp>

Inheritance diagram for ptems::LagrangePolynomials< 1 >:
Collaboration diagram for ptems::LagrangePolynomials< 1 >:

Static Public Member Functions

template<typename T >
static T * Polynomials (const ReferenceElement< 1 > &, const Vector< 1 > &pt, T *result, std::size_t polydeg)
 Computes the value of the Lagrange polynomials at a specified point which each Lagrange polynomial is 1 at one (different) point in the \(p+1\) equidistributed points on the reference interval \(4[-1.1]\) and zero at the rest, where \(p\) is the polynomial degree. More...
 
template<typename T >
static FuncAndGradData< 1, T > * Gradient (const ReferenceElement< 1 > &, const Vector< 1 > &pt, FuncAndGradData< 1, T > *result, std::size_t polydeg)
 Computes the value of the Lagrange polynomials, and their first order derivatives, at a specified point which each Lagrange polynomial is 1 at one (different) point in the \(p+1\) equidistributed points on the reference interval \(4[-1.1]\) and zero at the rest, where \(p\) is the polynomial degree. More...
 
template<typename T >
static FuncGradAndHessianData< 1, T > * Hessian (const ReferenceElement< 1 > &, const Vector< 1 > &pt, FuncGradAndHessianData< 1, T > *result, std::size_t polydeg)
 Computes the value of the Lagrange polynomials, and their first and second order derivatives, at a specified point which each Lagrange polynomial is 1 at one (different) point in the \(p+1\) equidistributed points on the reference interval \(4[-1.1]\) and zero at the rest, where \(p\) is the polynomial degree. More...
 
static constexpr std::size_t NumberDoFs ([[maybe_unused]] const ReferenceElement< 1 > &refElement, std::size_t polydeg)
 Gets the number of degrees of freedom required for a polynomial of the specified degree on the specified reference element. More...
 

Detailed Description

Defines Lagrange polynomials in the 1D reference element (the interval \(4[-1.1]\))

Member Function Documentation

◆ Gradient()

template<typename T >
static FuncAndGradData<1,T>* ptems::LagrangePolynomials< 1 >::Gradient ( const ReferenceElement< 1 > &  ,
const Vector< 1 > &  pt,
FuncAndGradData< 1, T > *  result,
std::size_t  polydeg 
)
inlinestatic

Computes the value of the Lagrange polynomials, and their first order derivatives, at a specified point which each Lagrange polynomial is 1 at one (different) point in the \(p+1\) equidistributed points on the reference interval \(4[-1.1]\) and zero at the rest, where \(p\) is the polynomial degree.

Template Parameters
TThe type of the result
Parameters
ptThe point to compute the values of the lagrange polynomial at
resultArray of at least polydeg+1 entries to store the result into
polydegThe polynomial degree of the Lagrange basis functions
Returns
Pointer to the entry AFTER the last basis filled (=result+polydeg+1)

◆ Hessian()

template<typename T >
static FuncGradAndHessianData<1,T>* ptems::LagrangePolynomials< 1 >::Hessian ( const ReferenceElement< 1 > &  ,
const Vector< 1 > &  pt,
FuncGradAndHessianData< 1, T > *  result,
std::size_t  polydeg 
)
inlinestatic

Computes the value of the Lagrange polynomials, and their first and second order derivatives, at a specified point which each Lagrange polynomial is 1 at one (different) point in the \(p+1\) equidistributed points on the reference interval \(4[-1.1]\) and zero at the rest, where \(p\) is the polynomial degree.

Template Parameters
TThe type of the result
Parameters
ptThe point to compute the values of the lagrange polynomial at
resultArray of at least polydeg+1 entries to store the result into
polydegThe polynomial degree of the Lagrange basis functions
Returns
Pointer to the entry AFTER the last basis filled (=result+polydeg+1)

◆ NumberDoFs()

static constexpr std::size_t ptems::Polynomials< 1 >::NumberDoFs ( [[maybe_unused] ] const ReferenceElement< 1 > &  refElement,
std::size_t  polydeg 
)
inlinestaticconstexprinherited

Gets the number of degrees of freedom required for a polynomial of the specified degree on the specified reference element.

Parameters
refElementThe reference interval (parameter is ignored)
polydegThe degree of the polynomial
Returns
The number of degrees of freedom

◆ Polynomials()

template<typename T >
static T* ptems::LagrangePolynomials< 1 >::Polynomials ( const ReferenceElement< 1 > &  ,
const Vector< 1 > &  pt,
T *  result,
std::size_t  polydeg 
)
inlinestatic

Computes the value of the Lagrange polynomials at a specified point which each Lagrange polynomial is 1 at one (different) point in the \(p+1\) equidistributed points on the reference interval \(4[-1.1]\) and zero at the rest, where \(p\) is the polynomial degree.

Template Parameters
TThe type of the result
Parameters
ptThe point to compute the values of the lagrange polynomial at
resultArray of at least polydeg+1 entries to store the result into
polydegThe polynomial degree of the Lagrange basis functions
Returns
Pointer to the entry AFTER the last basis filled (=result+polydeg+1)

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