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: basix._basixcpp.DPCVariant) str

Convert a Basix DPCVariant enum to a string.

Parameters

variant (basix.DPCVariant) – The DPC variant

Returns

The DPC variant as a string.

Return type

str

basix.variants.lagrange_variant_to_string(variant: basix._basixcpp.LagrangeVariant) str

Convert a Basix LagrangeVariant enum to a string.

Parameters

variant (basix.LagrangeVariant) – The Lagrange variant

Returns

The Lagrange variant as a string.

Return type

str

basix.variants.string_to_dpc_variant(variant: str) basix._basixcpp.DPCVariant

Convert a string to a Basix DPCVariant enum.

Parameters

variant (str) – The DPC variant as a string.

Returns

The DPC variant

Return type

basix.DPCVariant

basix.variants.string_to_lagrange_variant(variant: str) basix._basixcpp.LagrangeVariant

Convert a string to a Basix LagrangeVariant enum.

Parameters

variant (str) – The Lagrange variant as a string.

Returns

The Lagrange variant

Return type

basix.LagrangeVariant