Hey! I have a big doubt!!
I have a MixedFunctionSpace, named ME, and I define a function on it and then I split it:
V = FunctionSpace(mesh,"Lagrange",1)
ME = MixedFunctionSpace([V,V,V])
u= Function(ME)
c, mu, n = split (u)
Then I give an initial condition (or a value) to u with the class expression. If I define a function z on V, e.g. z= Function(V), and I initialize it with a value, can I make operations between z and c (for example) ?
For example, is it right to do something like
X = Function(V)
dof_V=V.dofmap.dofs()
dof_ME = ME.sub(0).dofmap.dofs()
for i in range (0, len(dof_V))
X.vector()[dof_V[i]] = u.vector()[dof_ME[i]] + z.vector()[dof_V[i]]
Thanks a lot!
Cristina