FEniCS/basix

Correct assumptions about degree

Closed this issue · 0 comments

It is currently assumed that the degree of each element is equal to the degree of the highest polynomial in the polyset. But this means that for serendipity div and curl elements, the sorted degree is not equal to the input degree.

Instead, we should return to storing the maximum degree separately.

This currently causes errors when these elements are wrapped using the UFL wrapper then used with DOLFINx, eg:

b_e = basix.create_element(basix.ElementFamily.N2E, basix.CellType.quadrilateral, 1
ufl_element = basix.ufl_wrapper.BasixElement(b_e)

(We can't just increase the degree of the N2E elements on quads to fix this, as we would like N2E on quads and triangles to agree on their values on a shared edge.)