Closed jorgensd closed 3 months ago
Current basix/ffcx/ufl example:
import basix.ufl
import ufl
cell = "triangle"
c_el = basix.ufl.element("Lagrange", cell,1, shape=(2, ))
mesh = ufl.Mesh(c_el)
element = basix.ufl.element("Lagrange", cell, 1)
me = basix.ufl.mixed_element([element, element])
W = ufl.FunctionSpace(mesh, me)
v,q = ufl.TestFunctions(W)
F = v*ufl.dx + q.dx(0)*ufl.dx
F0 = ufl.extract_blocks(F,0)
F1 = ufl.extract_blocks(F,1)
u, p = ufl.TrialFunctions(W)
J = ufl.inner(u, v)*ufl.dx + p*v.dx(0)*ufl.dx + q*u.dx(0)*ufl.dx + ufl.inner(ufl.grad(p), ufl.grad(q))*ufl.dx
J00 = ufl.extract_blocks(J,0,0)
J01 = ufl.extract_blocks(J,0,1)
J10 = ufl.extract_blocks(J,1,0)
J11 = ufl.extract_blocks(J,1,1)
forms = [F0, F1]
Resolve #284