I have in the past been able to use the syntax
u,v,w = U.split()
to get at the individual components of a 3-way mixed element U
.
With version 2016.1.0, split()
still works, but now I am confused what is being output. For example, there appears to be a hierarchy of mixed elements now :
from fenics import *
mesh = UnitCubeMesh(2,2,2)
Q = FiniteElement("CG", mesh.ufl_cell(), 1)
M = FunctionSpace(mesh, Q*Q*Q)
U = Function(M)
out = U.split()
out2 = out[0].split()
v = out[0]
w = out[1]
x = out2[0]
y = out2[1]
print id(v), id(w), id(x), id(y)
I can't seem to find the documentation on this, can anyone help?
Thanks again,
Evan
EDIT:
To clarify why I need this, I'd like to rename the individual components, and extract their functionspaces. This was possible with the old way and split()
.