← Back to team overview

ufl team mailing list archive

Re: [HG UFL] Added support for this syntax:

 

It is documented now, I wrote about it today. Not everything is
documented though. That's a major point of the next release.

Martin



On Tue, Apr 7, 2009 at 6:46 PM, Anders Logg <logg@xxxxxxxxx> wrote:
> ok.
>
> Is this documented in the manual? It made me confused the first time I
> saw it. Otherwise it's a good example to add.
>
> --
> Anders
>
>
> On Tue, Apr 07, 2009 at 06:42:28PM +0200, Martin Sandve Alnæs wrote:
>> Yes.
>>
>> grad(u).T*u
>> =
>> dot(grad(u).T, u)
>> =
>> dot(u, grad(u))
>>
>> Martin
>>
>>
>>
>> On Tue, Apr 7, 2009 at 6:40 PM, Anders Logg <logg@xxxxxxxxx> wrote:
>> > On Tue, Apr 07, 2009 at 05:19:42PM +0200, Martin Sandve Alnæs wrote:
>> >> On Tue, Apr 7, 2009 at 5:17 PM, Anders Logg <logg@xxxxxxxxx> wrote:
>> >> > On Tue, Apr 07, 2009 at 02:48:44PM +0200, UFL wrote:
>> >> >> One or more new changesets pushed to the primary ufl repository.
>> >> >> A short summary of the last three changesets is included below.
>> >> >>
>> >> >> changeset:   811:b96d2bbe8284a7255ca510c2fbb35b1445f85a11
>> >> >> tag:         tip
>> >> >> user:        "Martin Sandve Alnæs <martinal@xxxxxxxxx>"
>> >> >> date:        Tue Apr 07 14:50:30 2009 +0200
>> >> >> files:       doc/manual/chapters/formlanguage.tex ufl/operators.py
>> >> >> description:
>> >> >> Added support for this syntax:
>> >> >>
>> >> >> x = cell.x
>> >> >> Df = diff(f, x)
>> >> >>
>> >> >> Note that
>> >> >>   diff(f, x) == grad(f).T
>> >> >> because of the way diff is defined.
>> >> >> Thus diff(f,x) is the same as the FFC grad.
>> >> >> If we want to change this, it touches a lot
>> >> >> of places in AD code, so that won't happen now.
>> >> >
>> >> > How should the Navier-Stokes convective term be expressed in UFL?
>> >> >
>> >> > I guess one needs to write
>> >> >
>> >> >  grad(u).T*u
>> >> >
>> >> > ?
>> >>
>> >> Like you write it on paper:
>> >>
>> >> w . grad u = dot(w, grad(u))
>> >>
>> >> And:
>> >>
>> >> w . grad u . v = dot(dot(w, grad(u)), v)
>> >
>> > Yes, but does
>> >
>> >  grad(u).T*u
>> >
>> > also work?
>> >
>> >
>> > -----BEGIN PGP SIGNATURE-----
>> > Version: GnuPG v1.4.9 (GNU/Linux)
>> >
>> > iEYEARECAAYFAknbghQACgkQTuwUCDsYZdFqkQCZAVkYKk1Hejw+hw28NYsWwSgk
>> > JWMAmwXQsB9KNXiyV+lMwjdPnDOJKjPK
>> > =o2NS
>> > -----END PGP SIGNATURE-----
>> >
>> >
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAknbg08ACgkQTuwUCDsYZdExcACdF8SJey+K3tbiJiB1Q61uEG2n
> 1nAAmwYK17m+8GgWJg9HuTjKP1Bp03Yl
> =BuoJ
> -----END PGP SIGNATURE-----
>
>


References