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.

Classes

QuadratureType(value)

Quadrature type.

basix.quadrature.make_quadrature(cell: CellType, degree: int, rule: QuadratureType = QuadratureType.Default, polyset_type: PolysetType = PolysetType.standard) tuple[numpy.ndarray[Any, numpy.dtype[numpy.float64]], numpy.ndarray[Any, numpy.dtype[numpy.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:

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.