basix.quadrature

Functions to manipulate quadrature types.

Functions

make_quadrature(cell, degree[, rule, ...])

Create a quadrature rule.

string_to_type(rule)

Convert a string to a Basix QuadratureType enum.

type_to_string(quadraturetype)

Convert a Basix QuadratureType enum to a string.

basix.quadrature.make_quadrature(cell: ~basix._basixcpp.CellType, degree: int, rule: ~basix._basixcpp.QuadratureType = <QuadratureType.Default: 0>, polyset_type: ~basix._basixcpp.PolysetType = <PolysetType.standard: 0>) Tuple[ndarray[Any, dtype[float64]], ndarray[Any, dtype[float64]]]

Create a quadrature rule.

Parameters:
  • cell – Cell type

  • degree – Maximum polynomial degree that will be integrated exactly.

  • rule – Quadrature rule.

  • polyset_type – Type of polynomial that will be integrated exactly.

Returns:

The quadrature points and weights.

basix.quadrature.string_to_type(rule: str) QuadratureType

Convert a string to a Basix QuadratureType enum.

Parameters:

rule – Qquadrature rule as a string.

Returns:

The quadrature type.

basix.quadrature.type_to_string(quadraturetype: QuadratureType) str

Convert a Basix QuadratureType enum to a string.

Parameters:

quadraturetype – Quadrature type.

Returns:

The quadrature rule as a string.