basix.variants

Functions to manipulate variant types.

Functions

dpc_variant_to_string(variant)

Convert a Basix DPCVariant enum to a string.

lagrange_variant_to_string(variant)

Convert a Basix LagrangeVariant enum to a string.

string_to_dpc_variant(variant)

Convert a string to a Basix DPCVariant enum.

string_to_lagrange_variant(variant)

Convert a string to a Basix LagrangeVariant enum.

basix.variants.dpc_variant_to_string(variant: DPCVariant) str

Convert a Basix DPCVariant enum to a string.

Parameters:

variant – DPC variant.

Returns:

The DPC variant as a string.

basix.variants.lagrange_variant_to_string(variant: LagrangeVariant) str

Convert a Basix LagrangeVariant enum to a string.

Parameters:

variant – Lagrange variant.

Returns:

The Lagrange variant as a string.

basix.variants.string_to_dpc_variant(variant: str) DPCVariant

Convert a string to a Basix DPCVariant enum.

Parameters:

variant – DPC variant as a string.

Returns:

The DPC variant.

basix.variants.string_to_lagrange_variant(variant: str) LagrangeVariant

Convert a string to a Basix LagrangeVariant enum.

Parameters:

variant – Lagrange variant as a string.

Returns:

The Lagrange variant.