-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 26/11/14 12:24, Anna Kalogirou wrote:
Do I still need to define u1, u2, u3 = Functions(V), where V is in original space? After the variational problem is solved I split w as
u1, u2, u3 = split(w)
and try to print u1, u2, u3 in files, but I get
AttributeError: 'Indexed' object has no attribute 'function_space'.
Aha, you run into the split(w) vs. w.split() problem. When you're defining your variational form, you need to use the former. For output purposes (and assignment in a timestepping loop) you need to use the latter. e.g. u1, u2 = split(w) F = fn(u1, u2; v) u1, u2 = w.split() solve(F == 0, w) u1_.assign(u1) u2_.assign(u2) etc...
Also, I can't interpolate or assign. In the end, I want to pass u1, u2, u3 to some other functions u1_, u2_, u3_, which also appear in the residual expressions. But this produces a 'Mismatching function spaces' error.
I hope the above should also clear up this problem. Cheers, Lawrence -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iQEcBAEBAgAGBQJUdcteAAoJECOc1kQ8PEYv9FMIANxK3tJWLEHrK/mrd3zqWKFK C1pb9+IFoEENBX1kwlTjor8sOZjpK4i/jyMVyVLl+zML47rnTYLsY0uMBf8reuT0 72JjLo5C5+TEgXA3mHq0YE6Ohw/7ls38moJaE0LYKiTqZQ2xfsjH7VCTe4a4vXlo Kw0JIeiWPvq5SAhPRpv3xl4MYfFtpNtg9Qat+B8S9HJNzQeY1bEmSP9U8xzkcouT hOpg2FKseroIWK9CefCJgqF4Pa9vL8S5Hz3FWkt1QAJHS68+q8qSqxsMxLamrFZS E5uwqAqZMU02CTBSGtEKXqljEDoqd+XKGEEX6uq6qzFlrpmxEM6zXBVZC7+ofWU= =oHan -----END PGP SIGNATURE-----