You've got Function.split()
, static UFL split()
and few __getitem__()
s - I'm everytime a little bit confused. Nevertheless try this
up = Function(WP)
vq = TestFunction(WP) # Note TestFunction, not TestFunctions
u, p = as_vector((up[0], up[1])), up[2]
#u, p = split(up) # or use this
v, q = as_vector((vq[0], vq[1])), vq[2]
#v, q = split(vq) # or use this
#v, q = TestFunctions(WP) # or either this
F = dot(u, v) * dx
solve(F == 0, up)
You see, that split
s and Test/TrialFunctions
split the functions up to the first subspace level, while indexing using __getitem__()
operator gets you down through all the subspace levels.