MCPcopy Create free account
hub / github.com/FEniCS/dolfinx / _

Function _

python/dolfinx/fem/element.py:156–170  ·  view source on GitHub ↗

Create a Lagrange CoordinateElement from a Basix finite element. Coordinate elements are typically used when creating meshes. Args: e: Basix finite element. Returns: A coordinate element.

(e: basix.finite_element.FiniteElement)

Source from the content-addressed store, hash-verified

154
155@coordinate_element.register(basix.finite_element.FiniteElement)
156def _(e: basix.finite_element.FiniteElement) -> CoordinateElement:
157 """Create a Lagrange CoordinateElement from a Basix finite element.
158
159 Coordinate elements are typically used when creating meshes.
160
161 Args:
162 e: Basix finite element.
163
164 Returns:
165 A coordinate element.
166 """
167 try:
168 return CoordinateElement(_cpp.fem.CoordinateElement_float32(e._e))
169 except TypeError:
170 return CoordinateElement(_cpp.fem.CoordinateElement_float64(e._e))
171
172
173class FiniteElement(Generic[Real]):

Callers

nothing calls this directly

Calls 1

CoordinateElementClass · 0.70

Tested by

no test coverage detected