[firedrake] difference between matrix-action and form-action
Eike Mueller
E.Mueller at bath.ac.uk
Mon Apr 27 13:14:42 BST 2015
Hi,
I think I just saw a rounding error, and the results are the same. I hadn’t realised that the numbers I compare are very large, so that an absolute difference of 1.E-5 is rounding error. I will simply normalise the numbers by the maximum before doing the comparison.
Thanks,
Eike
> On 27 Apr 2015, at 12:26, Eike Mueller <E.Mueller at bath.ac.uk> wrote:
>
> Hi Lawrence,
>
> ok, so if I apply the BCs to u before the multiplication and to v after the multiplication I would expect the result to be the same in both versions, but it doesn’t look like it.
>
> Thanks,
>
> Eike
>
>> On 27 Apr 2015, at 12:19, Lawrence Mitchell <lawrence.mitchell at imperial.ac.uk> wrote:
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 27/04/15 12:04, Eike Mueller wrote:
>>> Dear firedrakers,
>>>
>>> Assume I have assembled a UFL form in the HDiv space:
>>>
>>> form_uu = [a UFL form] mat_uu = assemble(form_uu,bcs=bcs)
>>
>> This assembles an operator with bcs applied, useable in a linear
>> solver. The rows /and/ columns corresponding to the BC nodes are the
>> identity.
>>
>>> then shouldn’t the following two experssions fo exactly the same
>>> thing?
>>>
>>> version A: with v.dat.vec as y: with u.dat.vec_ro as x:
>>> mat_uu.M.handle.mult(x,y)
>>
>> So this computes I_{Gamma} + A_{Omega \ Gamma}, i.e. on the boundary
>> nodes y is x elsewhere it's Ax.
>>
>>> version B: v = self._mutilde._form_action(u)
>>
>> This computes the action of A on u /without/ boundary conditions.
>> What are you expecting to see?, Ax on the non-boundary condition
>> nodes, bc-value on the boundary values?
>>
>>> as fas as I can tell, only version B gives the correct result in my
>>> case.
>>
>> Lawrence
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1
>>
>> iQEcBAEBAgAGBQJVPhtOAAoJECOc1kQ8PEYv+VAIAMqhJa+dIZSlSu20g2BSecv6
>> WFTlDq/gyTu1kQs3mYrwrPTzAUbLt5jMjZMZdUdQVyXnQC4H1i3zBJch5z9smMmT
>> SDL6zIn120XYK+CjAD8snbpRLU/DPvdJ9DMo0QQ1c9swUSLdLxFEnxYuB2OQXqKI
>> nDF2c0T13+uiYQe9m7DzEHMEmN0TB4NZvez8X/6xPb/2lp0U1wwJDxU/7+nk9DDw
>> Qe5RIf5VVzUg21RhtvDAdZqp4AylBPq7GEpUwmcetv4PqYnjgcQMOYQaZGUW1AuC
>> qxVMP29VsjIUCjUlyE9KL7oBBshBjwci4icpkpgP8DC7YnuQrGvqWrgLBOIMHfI=
>> =NtfA
>> -----END PGP SIGNATURE-----
>>
>> _______________________________________________
>> firedrake mailing list
>> firedrake at imperial.ac.uk
>> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
>
> _______________________________________________
> firedrake mailing list
> firedrake at imperial.ac.uk
> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
More information about the firedrake
mailing list