Dear Lawrence, I believe the code (attached) sets up the matrices/vectrors/operators correctly. However, I have one question: Due to the use of a heavyside function, the operator B on the LHS is nonzero in a block NxN, say, in the bottom right corner. For that reason, when I solved the linear system in Matlab I only considered these nonzero values in the block, because otherwise the LHS would not be invertible. How come and it doesn't complain here? Best, Anna. On 20/10/15 17:03, Lawrence Mitchell wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 20/10/15 16:05, Anna Kalogirou wrote:
Dear Lawrence,
Thank you very much for the detailed reply. So if I understand correctly, I have to define the forms for A_form, Q1_form, Q2_form, rhs_form and use the bits of code you sent me. I hope so, note that I just typed it into the email so there are probably many other issues other than the one below.
If I do that, I get the error "Exception: Linear forms must be defined using test functions only: (1, 'k', 4, 4)" for Q2_form = mu*dx
where mu is a trial function. So is it not possible to assemble a vector using the trial function only? I think you can just use a test function from the appropriate space instead (the result will turn out the same I believe).
Lawrence -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux)
iQEcBAEBAgAGBQJWJmW7AAoJECOc1kQ8PEYvR7oH/Rhb9exp1TpOiDOH5QMO2EZT WyYexbWTUrPok3pA8PFvtg3kefpr9ao7j1UZpt9kiXpWCz8V4nL29tmPOTwCnXrp A3OzjCf1N1guwgk48rLatIH8bOuYvOP7yABA9LEOO5Gjzs0it4BdYozBcs0/of47 6Ue4QuKYFkJekgTgU27A8f3ubxJQtuWLaCM3vYaCLh2ecQHNxAhROk2H5zWChz4G E6HblBCY9EvvTbGLGOSUCmBfSra5DXh5pRQSBy+57c0rCM1f/ZYaZp9uxkdUIr4M rS29MAD5VCR6vD4rWDP3uM6qhpzCscPAc6bczhhWDFqhG0TIc2dp6z6o1Rb5RiA= =DF/m -----END PGP SIGNATURE-----
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
-- Dr Anna Kalogirou Research Fellow School of Mathematics University of Leeds http://www1.maths.leeds.ac.uk/~matak/