I’m working with a 2D mesh generated by Gmsh and encountered an error while writing the following code. Any help would be greatly appreciated.
element = basix.create_element(basix.ElementFamily.N1E, basix.CellType.triangle, 1)
e = basix.ufl_wrapper.BasixElement(element, 3)
V = fem.FunctionSpace(domain, e)
Et = ufl.TrialFunction(V)
W = ufl.TestFunction(V)
a = fem.form(ufl.inner(ufl.curl(Et), ufl.curl(W)) * ufl.dx)
Error:
Expecting pulled back expression with shape '(2,)', got '(3,)'
ERROR:UFL:Expecting pulled back expression with shape '(2,)', got '(3,)'
---------------------------------------------------------------------------
UFLException Traceback (most recent call last)
foo.ipynb Cell 3 line 9
6 Et = ufl.TrialFunction(V)
7 W = ufl.TestFunction(V)
----> 9 a=fem.form(ufl.inner(ufl.curl(Et), ufl.curl(W)) * ufl.dx)