[legacy fenics 2019.1.0] mixed function space for real elements?

Hello, I am trying to create a mixed function space for a real vector element of size 10 and a real scalar element, it might seem trivial (instead of just vector of 11), but I wanted to be able to separate them as needed.
Does anyone know how to implement this properly?

foo1 = fe.VectorElement("R", mesh.ufl_cell(),  dim=10)
foo2 = fe.FiniteElement("R", mesh.ufl_cell(), 0 )
foo3 = fe.MixedElement([foo1, foo2])
V = fe.FunctionSpace(mesh, foo3)

m=fe.Function(V)
mvec=m.sub(0)
m1 = m.sub(1)

You haven’t really described what issue you are having with the separation.

You are missing an argument to VectorElement (0, to describe the degree).


I can’t attach code directly, as I’m on my phone. However, this gives you the separable objects for usage in FEniCS.