Skip to content

Commit e69de17

Browse files
Use subdegree instead of superdegree to check cell bendy-ness (FEniCS#295)
The reason subdegree is right is that you care about whether the edges are straight, not whether there are any quadratic functions on the interior. See firedrakeproject/firedrake#3612. Co-authored-by: Matthew Scroggs <[email protected]>
1 parent 7bfef95 commit e69de17

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ufl/algorithms/apply_geometry_lowering.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def _reduce_cell_edge_length(self, o, reduction_op):
304304

305305
domain = extract_unique_domain(o)
306306

307-
if domain.ufl_coordinate_element().embedded_superdegree > 1:
307+
if domain.ufl_coordinate_element().embedded_subdegree > 1:
308308
# Don't lower bendy cells, instead leave it to form compiler
309309
warnings.warn("Only know how to compute cell edge lengths of P1 or Q1 cell.")
310310
return o
@@ -329,7 +329,7 @@ def cell_diameter(self, o):
329329

330330
domain = extract_unique_domain(o)
331331

332-
if domain.ufl_coordinate_element().embedded_superdegree > 1:
332+
if domain.ufl_coordinate_element().embedded_subdegree > 1:
333333
# Don't lower bendy cells, instead leave it to form compiler
334334
warnings.warn("Only know how to compute cell diameter of P1 or Q1 cell.")
335335
return o
@@ -366,7 +366,7 @@ def _reduce_facet_edge_length(self, o, reduction_op):
366366
if domain.ufl_cell().topological_dimension() < 3:
367367
raise ValueError("Facet edge lengths only make sense for topological dimension >= 3.")
368368

369-
elif domain.ufl_coordinate_element().embedded_superdegree > 1:
369+
elif domain.ufl_coordinate_element().embedded_subdegree > 1:
370370
# Don't lower bendy cells, instead leave it to form compiler
371371
warnings.warn("Only know how to compute facet edge lengths of P1 or Q1 cell.")
372372
return o

0 commit comments

Comments
 (0)