mtnlion.element module

Element mapping utilities

class mtnlion.element.Element[source]

Bases: object

Abstract base class to define the interface for “elements”

elements

A list of elements defining the solution vector.

:raises NotImplementedError if not implemented.

mapping

A dictionary defining the mapping between trial functions and elements. Elements are stored as a list in self.elements.

:raises NotImplementedError if not implemented.

class mtnlion.element.ElementSpace(equation_spec: Mapping[str, mtnlion.domain.Domain[str, List[Any]]])[source]

Bases: mtnlion.element.Element

ElementSpace is used to define the mapping between functions and their domains to a list of elements that FEniCS can recognize.

elements

A list of elements defining the solution vector.

:raises NotImplementedError if not implemented.

mapping

A dictionary defining the mapping between trial functions and elements. Elements are stored as a list in self.elements.

:raises NotImplementedError if not implemented.

shift(offset: int) → None[source]

Shift the indices of the map by an offset. Usually used to merge element spaces.

Parameters

offset – Amount to offset the map

class mtnlion.element.MixedElementSpace(*spaces)[source]

Bases: mtnlion.element.Element

Handles the combination of multiple element spaces into one vector.

elements

A list of elements defining the solution vector.

:raises NotImplementedError if not implemented.

mapping

A dictionary defining the mapping between trial functions and elements. Elements are stored as a list in self.elements.

:raises NotImplementedError if not implemented.