Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mscroggs committed Sep 27, 2024
1 parent e855ec3 commit 05b21eb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions symfem/elements/bubble.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@ def __init__(self, reference: Reference, order: int, variant: str = "equispaced"
from symfem import create_element

p1 = create_element(reference.name, "Lagrange", 1, vertices=reference.vertices)
basis = p1.get_basis_functions()
bubble = 1
if reference.name in ["interval", "quadrilateral", "hexahedron"]:
for v in x[: reference.tdim]:
bubble *= v * (1 - v)
if reference.name in "quadrilateral":
bubble *= basis[0]
bubble *= basis[3]
if reference.name in "hexahedron":
bubble *= basis[0]
bubble *= basis[7]
else:
for f in p1.get_basis_functions():
for f in basis:
bubble *= f

if reference.name in ["interval", "quadrilateral", "hexahedron"]:
Expand Down
2 changes: 1 addition & 1 deletion symfem/elements/serendipity.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def polynomial_superdegree(self) -> typing.Optional[int]:
min_order = 1
continuity = "C0"
value_type = "scalar"
last_updated = "2023.06"
last_updated = "2024.09"


class SerendipityCurl(CiarletElement):
Expand Down

0 comments on commit 05b21eb

Please sign in to comment.