[firedrake] Problem with Jacobian

Lawrence Mitchell lawrence.mitchell at imperial.ac.uk
Wed Nov 11 10:03:25 GMT 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/11/15 15:18, Buesing, Henrik wrote:
>> In this setup you shouldn't have even needed to type "make". My
>> initial suspicion is that this is an >actual issue with the new
>> code. Can you please push your changes to a fork on github so we
>> can see what >you've got there?
> 
> 
> 
> Ok. I think I have done this (see 
> https://github.com/hbuesing/firedrake).

Thanks, do you want to open a pull request from your modified branch
into the upstream firedrake?

> But how can I have du=None and still pass the
> coefficient_derivatives?
> 
> 
> 
> How do I pass a Jacobian du correctly for my attached test.py?

Ah, I think you are misunderstanding what the du argument to
derivative is for.

derivative(F, u)

computes the derivative of F in the direction u symbolically.  If F is
a residual (linear in a test function) it linearises F around u.  The
linear algebra representation of this linearisation is a matrix.  So
the resulting symbolic object contains both a test and a trial
function (an "Argument").  By default, the new Argument is constructed
automatically inside the derivative call, however, you can also
provide it.  This is what the optional du is for.

So if you don't want to provide this, but still pass in
coefficient_derivatives you can do:

J = derivative(F, u, coefficient_derivatives=...)

Does this make sense?

Cheers,

Lawrence


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQEcBAEBAgAGBQJWQxJtAAoJECOc1kQ8PEYvAAYH/j4ppPKTYDhQVvaOo0M7CoBG
qidmCxYE00J97Z66Fee9dSW4KzlqeBJeKSZ8QxufKbcXdmHrzkK7j9AO1iB0rAOO
4GmvkdVtTiHb8Ugd0hZi1fHtlbHWnHPmxd4lYrhgqiJxvQk/mTE7dCzMtxYCobrO
7KdeOcxxoIh4c6/lPlZbebmM/KB/+59B+HDYQjlhPWQrPxUOOoOXgwOtM9jn+7R8
Ttn/dVJayH4ycZ8BjRJWXV6KY+LTJwN7rQiTd3Mrt3A03VuEuMVIgHsZb35AMr1S
bX1kD4zlMyXaEAn9h1htWXTmNbyWaQTf/w0v8Of+Sq8k+6pAWEjzNLk5kXjEkUM=
=EgNZ
-----END PGP SIGNATURE-----



More information about the firedrake mailing list