Skip to content

Commit

Permalink
More wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
schnellerhase committed Nov 29, 2024
1 parent d5b32f9 commit 3a3a565
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions python/dolfinx/fem/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,16 @@ def finite_element(
raise ValueError(f"Unsupported dtype: {dtype}")

if ufl_e.is_mixed:
elements = [finite_element(cell_type, e, dtype) for e in ufl_e.sub_elements]
return CppElement(elements)
elements = [finite_element(cell_type, e, dtype)._cpp_object for e in ufl_e.sub_elements]
return FiniteElement(CppElement(elements))
elif ufl_e.is_quadrature:
return CppElement(
cell_type, ufl_e.custom_quadrature()[0], ufl_e.reference_value_shape, ufl_e.is_symmetric
return FiniteElement(
CppElement(
cell_type,
ufl_e.custom_quadrature()[0],
ufl_e.reference_value_shape,
ufl_e.is_symmetric,
)
)
else:
basix_e = ufl_e.basix_element._e
Expand Down

0 comments on commit 3a3a565

Please sign in to comment.