Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion FIAT/Sminus.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(self, ref_el, degree, mapping):
flat_el = flatten_reference_cube(ref_el)
dim = flat_el.get_spatial_dimension()
self.fdim = dim
if dim != 2 or dim != 3:
if dim not in (2, 3):
raise Exception("Trimmed serendipity elements only valid for dimensions 2 and 3")

flat_topology = flat_el.get_topology()
Expand Down
6 changes: 3 additions & 3 deletions finat/ufl/elementlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def show_elements():

# Elements not in the periodic table
# TODO: Implement generic Tear operator for elements instead of this:
register_element("Brezzi-Douglas-Fortin-Marini", "BDFM", 1, HDiv, "contravariant Piola", (1, None), simplices[1:])
register_element("Brezzi-Douglas-Fortin-Marini", "BDFM", 1, HDiv, "contravariant Piola", (2, 2), ("triangle",))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also the right fix for this one is #181. We just need to update the regression tests

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
register_element("Brezzi-Douglas-Fortin-Marini", "BDFM", 1, HDiv, "contravariant Piola", (2, 2), ("triangle",))
register_element("Brezzi-Douglas-Fortin-Marini", "BDFM", 1, HDiv, "contravariant Piola", (1, None), simplices[1:])

register_element("Crouzeix-Raviart", "CR", 0, L2, "identity", (1, None), simplices[1:])
register_element("Discontinuous Raviart-Thomas", "DRT", 1, L2, "contravariant Piola", (1, None), simplices[1:])
register_element("Kong-Mulder-Veldhuizen", "KMV", 0, H1, "identity", (1, None), simplices[1:])
Expand All @@ -106,7 +106,7 @@ def show_elements():

register_element("Nonconforming Arnold-Winther", "AWnc", 2, HDiv, "double contravariant Piola", (2, 2), ("triangle",))
register_element("Conforming Arnold-Winther", "AWc", 2, HDiv, "double contravariant Piola", (3, None), ("triangle",))
register_element("Hu-Zhang", "HZ", 2, HDiv, "double contravariant Piola", (3, None), ("triangle"))
register_element("Hu-Zhang", "HZ", 2, HDiv, "double contravariant Piola", (3, None), ("triangle",))

# Zany elements
register_element("Bernardi-Raugel", "BR", 1, H1, "contravariant Piola", (1, None), simplices[1:])
Expand Down Expand Up @@ -148,7 +148,7 @@ def show_elements():
register_element("Real", "R", 0, HInf, "identity", (0, 0), any_cell + ("TensorProductCell",))
register_element("Undefined", "U", 0, L2, "identity", (0, None), any_cell)
register_element("Radau", "Rad", 0, L2, "identity", (0, None), ("interval",))
register_element("HDiv Trace", "HDivT", 0, L2, "identity", (0, None), any_cell)
register_element("HDiv Trace", "HDivT", 0, L2, "identity", (0, None), (None, *simplices[1:], *cubes[1:], "prism", "pyramid"))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HDivT would be easy to implement on an interval. In fact I redid here #151

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does None stand for?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we support anything on pyramids?


# Spectral elements.
register_element("Gauss-Legendre", "GL", 0, L2, "identity", (0, None), ("interval",))
Expand Down