splitting mixed vectors
Hi. If w is a function from a MixedSpace, what is the exact difference between (v,p)=w.split() and (v,p)=split(w)?
JH
Example:
mesh = UnitSquare(32,32)
V = VectorFunctionS
P = FunctionSpace(mesh, "CG",1)
W = MixedFunctionSp
(u, q) = TestFunctions(W)
w = Function(W)
(v, p) = w.split() # <- this doesn't work, gives Exception: Form (<empty Form>) seems to be zero: cannot compile it.
#(v, p) = (as_vector((w[0], w[1])), w[2]) # <- this is ok
#(v,p) = split(w) # <- this is ok
F = -p*div(u)*dx + inner(grad(
solve(F==0, w , bcs=bcs)
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Jaroslav Hron for more information if necessary.