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.

basix.quadrature.make_quadrature(cell: CellType, degree: int, rule: QuadratureType = QuadratureType.default, polyset_type: PolysetType = PolysetType.standard) tuple[_SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]]

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.