Skip to content

Commit

Permalink
Logic fix
Browse files Browse the repository at this point in the history
  • Loading branch information
garth-wells committed Nov 19, 2024
1 parent a2f6235 commit fbb37f8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/basix/ufl.py
Original file line number Diff line number Diff line change
Expand Up @@ -2237,7 +2237,7 @@ def mixed_element(elements: list[_ElementBase]) -> _ElementBase:
if len(elements) > 1:
return _MixedElement(elements)
else:
return elements
return elements[0]


def quadrature_element(
Expand Down
12 changes: 12 additions & 0 deletions test/test_ufl_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,23 @@ def test_enriched_element(elements):
"e,space0,space1",
[
(basix.ufl.element("Lagrange", basix.CellType.triangle, 2), "H1", basix.SobolevSpace.H1),
(
basix.ufl.mixed_element([basix.ufl.element("Lagrange", basix.CellType.triangle, 2)]),
"H1",
basix.SobolevSpace.H1,
),
(
basix.ufl.element("Discontinuous Lagrange", basix.CellType.triangle, 0),
"L2",
basix.SobolevSpace.L2,
),
(
basix.ufl.mixed_elementelement(
[basix.ufl.element("Discontinuous Lagrange", basix.CellType.triangle, 0)]
),
"L2",
basix.SobolevSpace.L2,
),
(
basix.ufl.mixed_element(
[
Expand Down

0 comments on commit fbb37f8

Please sign in to comment.