basix.polynomials

Functions for working with polynomials.

Functions

reshape_coefficients(poly_type, cell_type, ...)

Reshape the coefficients.

basix.polynomials.dim()

polynomials_dim(arg0: basix._basixcpp.PolynomialType, arg1: basix::cell::type, arg2: int) -> int

@brief Dimension of a polynomial space.

Parameters
  • polytype – The polynomial type

  • cell – The cell type

  • d – The polynomial degree

Returns

The number terms in the basis spanning a space of polynomial degree @p d

basix.polynomials.reshape_coefficients(poly_type: PolynomialType, cell_type: CellType, coefficients: ndarray[Any, dtype[float64]], value_size: int, input_degree: int, output_degree: int) ndarray[Any, dtype[float64]]

Reshape the coefficients.

Parameters
  • poly_type – The polynomial type.

  • cell_type – The cell type

  • coefficients – The coefficients

  • value_size – The value size of the polynomials associated with the coefficients

  • input_degree – The maximum degree of polynomials associated with the input coefficients

  • output_degree – The maximum degree of polynomials associated with the output coefficients

Returns

Coefficients representing the same coefficients as the input in the set of polynomials of the output degree