basix.ufl_wrapper

Functions to directly wrap Basix elements in UFL.

Functions

compute_signature(element)

Compute a signature of a custom element.

map_type_to_string(map_type)

Convert map type to a UFL string.

Classes

BasixElement(element)

A wrapper allowing Basix elements to be used with UFL.

class basix.ufl_wrapper.BasixElement(element)

Bases: ufl.finiteelement.finiteelementbase.FiniteElementBase

A wrapper allowing Basix elements to be used with UFL.

Initialize basic finite element data.

mapping()

Get the map type for this element.

class basix.ufl_wrapper.FiniteElementBase(family, cell, degree, quad_scheme, value_shape, reference_value_shape)

Bases: object

Base class for all finite elements.

Initialize basic finite element data.

cell()

Return cell of finite element.

degree(component=None)

Return polynomial degree of finite element.

extract_component(i)

Recursively extract component index relative to a (simple) element and that element for given value component index.

extract_reference_component(i)

Recursively extract reference component index relative to a (simple) element and that element for given reference value component index.

extract_subelement_component(i)

Extract direct subelement index and subelement relative component index for a given component index.

extract_subelement_reference_component(i)

Extract direct subelement index and subelement relative reference component index for a given reference component index.

family()

Return finite element family.

is_cellwise_constant(component=None)

Return whether the basis functions of this element is spatially constant over each cell.

mapping()

Not implemented.

num_sub_elements()

Return number of sub-elements.

quadrature_scheme()

Return quadrature scheme of finite element.

reference_value_shape()

Return the shape of the value space on the reference cell.

reference_value_size()

Return the integer product of the reference value shape.

sub_elements()

Return list of sub-elements.

symmetry()

Return the symmetry dict, which is a mapping \(c_0 \to c_1\) meaning that component \(c_0\) is represented by component \(c_1\). A component is a tuple of one or more ints.

value_shape()

Return the shape of the value space on the global domain.

value_size()

Return the integer product of the value shape.

variant()

Return the variant used to initialise the element.

basix.ufl_wrapper.compute_signature(element)

Compute a signature of a custom element.

basix.ufl_wrapper.map_type_to_string(map_type)

Convert map type to a UFL string.