Basix 0.12.0.dev0
Loading...
Searching...
No Matches
Enumerations | Functions
basix::polynomials Namespace Reference

Polynomials. More...

Enumerations

enum class  type { legendre = 0 , lagrange = 1 , bernstein = 2 }
 Polynomial types that can be created. More...
 

Functions

template<std::floating_point T>
std::pair< std::vector< T >, std::array< std::size_t, 2 > > tabulate (polynomials::type polytype, cell::type celltype, int d, md::mdspan< const T, md::dextents< std::size_t, 2 > > x)
 Tabulate a set of polynomials.
 
int dim (polynomials::type polytype, cell::type cell, int d)
 Dimension of a polynomial space.
 

Detailed Description

Polynomials.

Enumeration Type Documentation

◆ type

Polynomial types that can be created.

Enumerator
legendre 

Legendre polynomials: polynomials that span the full space on a cell.

lagrange 

Lagrange polynomials: polynomials that span the Lagrange space on a cell. Note that these will be equal to the Legendre polynomials on all cells except pyramids

bernstein 

Bernstein polynomials.

Function Documentation

◆ tabulate()

template<std::floating_point T>
std::pair< std::vector< T >, std::array< std::size_t, 2 > > basix::polynomials::tabulate ( polynomials::type  polytype,
cell::type  celltype,
int  d,
md::mdspan< const T, md::dextents< std::size_t, 2 > >  x 
)

Tabulate a set of polynomials.

Parameters
[in]polytypePolynomial type
[in]celltypeCell type
[in]dPolynomial degree
[in]xPoints at which to evaluate the basis. The shape is (number of points, geometric dimension).
Returns
Polynomial values tabulated at points. The shape is (basis index, number of points).

◆ dim()

int basix::polynomials::dim ( polynomials::type  polytype,
cell::type  cell,
int  d 
)

Dimension of a polynomial space.

Parameters
[in]polytypePolynomial type
[in]cellCell type
[in]dPolynomial degree
Returns
The number of terms in the basis spanning a space of polynomial degree d.