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

Defines Lagrange polynomials in the 2D on the reference square \([-1,1]^2\) or reference triangle \( Conv\{(-1,-1),(1,-1),(-1,1)\} \), where \(Conv\) is the convex hull. More...

#include <ptems/spaces/lagrangepolynomials.hpp>

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

Static Public Member Functions

template<typename T >
static T * Polynomials (const ReferenceElement< 2 > &refElement, const Vector< 2 > &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)^2\) or \(\frac{(p+1)(p+2}2\) equidistributed points on the reference square or triangle, respectively, and zero at the rest, where \(p\) is the polynomial degree. More...
 
template<typename T >
static FuncAndGradData< 2, T > * Gradient (const ReferenceElement< 2 > &refElement, const Vector< 2 > &pt, FuncAndGradData< 2, T > *result, std::size_t polydeg)
 Computes the value of the Lagrange polynomials, and their first order (partial) derivatives, at a specified point which each Lagrange polynomial is 1 at one (different) point in the \((p+1)^2\) or \(\frac{(p+1)(p+2}2\) equidistributed points on the reference square or triangle, respectively, and zero at the rest, where \(p\) is the polynomial degree. More...
 
template<typename T >
static FuncGradAndHessianData< 2, T > * Hessian (const ReferenceElement< 2 > &refElement, const Vector< 2 > &pt, FuncGradAndHessianData< 2, T > *result, std::size_t polydeg)
 Computes the value of the Lagrange polynomials, and their first and second order (partial) derivatives, at a specified point which each Lagrange polynomial is 1 at one (different) point in the \((p+1)^2\) or \(\frac{(p+1)(p+2}2\) equidistributed points on the reference square or triangle, respectively, and zero at the rest, where \(p\) is the polynomial degree. More...
 
static constexpr std::size_t NumberDoFs (const ReferenceElement< 2 > &element, 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 2D on the reference square \([-1,1]^2\) or reference triangle \( Conv\{(-1,-1),(1,-1),(-1,1)\} \), where \(Conv\) is the convex hull.

Member Function Documentation

◆ Gradient()

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

Computes the value of the Lagrange polynomials, and their first order (partial) derivatives, at a specified point which each Lagrange polynomial is 1 at one (different) point in the \((p+1)^2\) or \(\frac{(p+1)(p+2}2\) equidistributed points on the reference square or triangle, respectively, and zero at the rest, where \(p\) is the polynomial degree.

Template Parameters
TThe type of the result
Parameters
refElementReference element - either the reference square or triangle
ptThe point to compute the values of the Lagrange polynomial at
resultArray of at least \((p+1)^2\) or \(\frac{(p+1)(p+2}2\) entries, depending on refElement, to store the result into
polydegThe polynomial degree of the Lagrange basis functions
Returns
Pointer to the entry AFTER the last basis filled (=result+N where N is the number of basis functions depending on the reference element)

◆ Hessian()

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

Computes the value of the Lagrange polynomials, and their first and second order (partial) derivatives, at a specified point which each Lagrange polynomial is 1 at one (different) point in the \((p+1)^2\) or \(\frac{(p+1)(p+2}2\) equidistributed points on the reference square or triangle, respectively, and zero at the rest, where \(p\) is the polynomial degree.

Template Parameters
TThe type of the result
Parameters
refElementReference element - either the reference square or triangle
ptThe point to compute the values of the Lagrange polynomial at
resultArray of at least \((p+1)^2\) or \(\frac{(p+1)(p+2}2\) entries, depending on refElement, to store the result into
polydegThe polynomial degree of the Lagrange basis functions
Returns
Pointer to the entry AFTER the last basis filled (=result+N where N is the number of basis functions depending on the reference element)

◆ NumberDoFs()

static constexpr std::size_t ptems::Polynomials< 2 >::NumberDoFs ( const ReferenceElement< 2 > &  element,
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
elementThe reference element (triangle or square)
polydegThe degree of the polynomial
Returns
The number of degrees of freedom

◆ Polynomials()

template<typename T >
static T* ptems::LagrangePolynomials< 2 >::Polynomials ( const ReferenceElement< 2 > &  refElement,
const Vector< 2 > &  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)^2\) or \(\frac{(p+1)(p+2}2\) equidistributed points on the reference square or triangle, respectively, and zero at the rest, where \(p\) is the polynomial degree.

Template Parameters
TThe type of the result
Parameters
refElementReference element - either the reference square or triangle
ptThe point to compute the values of the Lagrange polynomial at
resultArray of at least \((p+1)^2\) or \(\frac{(p+1)(p+2}2\) entries, depending on refElement, to store the result into
polydegThe polynomial degree of the Lagrange basis functions
Returns
Pointer to the entry AFTER the last basis filled (=result+N where N is the number of basis functions depending on the reference element)

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