[firedrake] Difference between u.split() and split(u)

Lawrence Mitchell lawrence.mitchell at imperial.ac.uk
Wed Nov 4 14:57:38 GMT 2015


> On 4 Nov 2015, at 14:51, Buesing, Henrik <HBuesing at eonerc.rwth-aachen.de> wrote:
> 
> Dear all,
> 
> I have a multi-physics problem and u is my unknown. I was wondering what the difference between
> 
> u.split() and split(u)
> 
> is.
> 
> It seems that the Jacobian is only right, when I use split(u) and then further use this in subroutines. If I use u.split() my Jacobian is zero…

It is an ongoing issue that we would like to resolve!

Rule of thumb:

Use:

split(u) if you're going to use the split things in UFL forms

Use:

u.split() if you want to be able to do point wise operations on the split fields, or output them.

These two things result in different types of objects (but wrapping the same, underlying, coefficients).

Lawrence

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mailman.ic.ac.uk/pipermail/firedrake/attachments/20151104/765acebf/attachment.sig>


More information about the firedrake mailing list