PTEMS  0.1.0-dev+git.81fd0e4
PolyTopic Element Method Solver
ptems::LegendrePolynomials< DIM > Struct Template Reference

Defines Legendre polynomials in the specified dimension on reference elements. More...

#include <ptems/spaces/legendrepolynomials.hpp>

Inheritance diagram for ptems::LegendrePolynomials< DIM >:
Collaboration diagram for ptems::LegendrePolynomials< DIM >:

Static Public Member Functions

template<typename T = double>
static Vector< DIM > EstimateAnalyticity (const ReferenceElement< DIM > &refElement, std::size_t polydeg, const T *coefficients)
 Estimates the analyticity of a function with the current basis and specified coefficients. More...
 
static T * Polynomials (const ReferenceElement< DIM > &refElement, const Vector< DIM > &pt, T *result, std::size_t polydeg)
 Computes the value of the first N hierarchical polynomials on the reference element, where N is the result of NumberDoFs(refElement, polydeg). More...
 
static FuncAndGradData< DIM, T > * Gradient (const ReferenceElement< DIM > &refElement, const Vector< DIM > &pt, FuncAndGradData< DIM, T > *result, std::size_t polydeg)
 Computes the value of the first N hierarchical polynomials, and their first order derivatives, on the reference element, where N is the result of NumberDoFs(refElement, polydeg). More...
 
static FuncGradAndHessianData< DIM, T > * Hessian (const ReferenceElement< DIM > &refElement, const Vector< DIM > &pt, FuncGradAndHessianData< DIM, T > *result, std::size_t polydeg)
 Computes the value of the first N hierarchical polynomials, and their first and second order derivatives, on the reference element, where N is the result of NumberDoFs(refElement, polydeg). More...
 
static std::vector< std::size_tIndices (const ReferenceElement< DIM > &refElement, std::size_t originalPolydeg, std::size_t newPolydeg)
 Gets the indices of the subset of the basis for polynomial degree originalPolydeg which form the basis for polynomial degree newPolydeg. More...
 

Detailed Description

template<std::size_t DIM>
struct ptems::LegendrePolynomials< DIM >

Defines Legendre polynomials in the specified dimension on reference elements.

Defines Legendre polynomials on a reference element.

Template Parameters
DIMThe dimension the Legendre polynomials are in

Member Function Documentation

◆ EstimateAnalyticity()

template<std::size_t DIM>
template<typename T = double>
static Vector<DIM> ptems::LegendrePolynomials< DIM >::EstimateAnalyticity ( const ReferenceElement< DIM > &  refElement,
std::size_t  polydeg,
const T *  coefficients 
)
inlinestatic

Estimates the analyticity of a function with the current basis and specified coefficients.

Template Parameters
TThe type of the coefficients (default=double)
Parameters
refElementThe reference element
polydegThe polynomial degree of the function
coefficientsArray of coefficients for each basis. Must be length of NumberDoFs
Returns
Vector of analyticity for each dimension in range [0,1], or -1 if analyticity computation invalid

◆ Gradient()

static FuncAndGradData<DIM,T>* ptems::HierarchicalPolynomials< LegendrePolynomials< 1 > , DIM >::Gradient ( const ReferenceElement< DIM > &  refElement,
const Vector< DIM > &  pt,
FuncAndGradData< DIM, T > *  result,
std::size_t  polydeg 
)
inlinestaticinherited

Computes the value of the first N hierarchical polynomials, and their first order derivatives, on the reference element, where N is the result of NumberDoFs(refElement, polydeg).

Template Parameters
TThe type of the result
Parameters
refElementReference element - either the reference square or triangle
ptThe point to compute the values of the hierarchical polynomial at
resultArray of at least NumberDoFs(refElement, polydeg) entries, to store the result into
polydegThe polynomial degree of the hierarchical 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()

static FuncGradAndHessianData<DIM,T>* ptems::HierarchicalPolynomials< LegendrePolynomials< 1 > , DIM >::Hessian ( const ReferenceElement< DIM > &  refElement,
const Vector< DIM > &  pt,
FuncGradAndHessianData< DIM, T > *  result,
std::size_t  polydeg 
)
inlinestaticinherited

Computes the value of the first N hierarchical polynomials, and their first and second order derivatives, on the reference element, where N is the result of NumberDoFs(refElement, polydeg).

Template Parameters
TThe type of the result
Parameters
refElementReference element - either the reference square or triangle
ptThe point to compute the values of the hierarchical polynomial at
resultArray of at least NumberDoFs(refElement, polydeg) entries, to store the result into
polydegThe polynomial degree of the hierarchical 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)

◆ Indices()

static std::vector<std::size_t> ptems::HierarchicalPolynomials< LegendrePolynomials< 1 > , DIM >::Indices ( const ReferenceElement< DIM > &  refElement,
std::size_t  originalPolydeg,
std::size_t  newPolydeg 
)
inlinestaticinherited

Gets the indices of the subset of the basis for polynomial degree originalPolydeg which form the basis for polynomial degree newPolydeg.

Note
For hierarchical polynomials the polynomials of order newPolydeg are contained within the set of polynomials of order originalPolydeg
Exceptions
std::invalid_argumentIf newPolydeg > originalPolydeg
Parameters
refElementThe reference element the bases are defined on
originalPolydegThe polynomial degree of the original basis
newPolydegThe polynomial degree of the smaller basis to get the indices of
Returns
Map of indices for the smaller basis to the original larger basis index

◆ Polynomials()

static T* ptems::HierarchicalPolynomials< LegendrePolynomials< 1 > , DIM >::Polynomials ( const ReferenceElement< DIM > &  refElement,
const Vector< DIM > &  pt,
T *  result,
std::size_t  polydeg 
)
inlinestaticinherited

Computes the value of the first N hierarchical polynomials on the reference element, where N is the result of NumberDoFs(refElement, polydeg).

Template Parameters
TThe type of the result
Parameters
refElementReference element
ptThe point to compute the values of the hierarchical polynomial at
resultArray of at least NumberDoFs(refElement, polydeg) entries, to store the result into
polydegThe polynomial degree of the hierarchical 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: