On 26 Nov 2014, at 15:18, Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk> wrote:
Hi Anna,
On 26 Nov 2014, at 14:19, Anna Kalogirou <a.kalogirou@leeds.ac.uk> wrote:
That is what is am doing and it still complains about Mismatching Function Spaces.. So what I have now is, let's say
u1_ = Function(V) u2_ = Function(V) w = Function(W), where W = V*V v = TestFunction(W)
u1, u2 = split(w) v1, v2 = split(v) *Here I also tried defining instead v1, v2 = TestFunctions(W).*
F = fn(u1, u2, u1_, u2_; v1) G = fn(u1, u2, u1_, u2_; v2)
u1, u2 = w.split() *OR does this need to be after the variational problem is solved?* *I tried both with the same outcome.*
solve(F == 0, w)
u1_.assign(u1) u2_.assign(u2).
I see. It turns out support for this option is currently unimplemented in the expression assembler (used for assignment here). However, it should be possible, because the functionspaces all match. The code change to allow this was quite small, so I did so. It is currently waiting on code review but should hopefully be in firedrake master soon: you can see the changes here https://github.com/firedrakeproject/firedrake/pull/400.
This change is now in master. So if you update your firedrake install (you may also need to update FIAT and FFC, but possibly not), rebuild (with make), your problem should go away. Cheers, Lawrence