ffc team mailing list archive
-
ffc team
-
Mailing list archive
-
Message #00151
Re: Suggestions for changes [...]
-
To:
Discussion of FFC development <ffc-dev@xxxxxxxxxx>
-
From:
Robert C. Kirby <kirby@xxxxxxxxxxxx>
-
Date:
Wed, 1 Jun 2005 09:20:13 -0500
-
In-reply-to:
<20050531040850.GJ13821@galerkin>
I need to think this through. At some point we probably need to add an
option for quadrature, but there may be other ways to handle it, for
This is also possible to allow further experimentation.
example by declaring dx differently. We currently have
dx = Integral("interior")
...
a = u.dx(i)*v.dx(i)*dx
The declaration of dx is normally not visible (it's added by the
simple FFC parser that preprocesses a given .form file and adds the
necessary declarations on top of the file).
For quadrature, one could do
dx = Integral("interior quadrature")
...
a = u.dx(i)*v.dx(i)*dx
Different terms can be integrated differently (quadrature or tensor)
and combined in the same form.
This is a good idea -- I meant by projection the L2 projection
(Pi u,v) = (u,v) or the (local) H1 projection
(grad( Pi u ) , grad( v ) ) = ( grad( u ) , grad( v ) )
as opposed to nodal interpolation.
Of course, opening up the possibility of varying quadrature is an
orthogonal dimension to these.
Rot/curl is a little trickier, as you need to know whether
you're in 2d or 3d.
Good idea. I also need to add a scalar product (could overload the ','
operator) that translates
(grad(u), grad(v))
I wouldn't overload the comma operator since that is used in duality
pairings and FFC works on integrands / measure. I don't think you even
can overload , in Python.
Note that the index needs to be the same in both u.dx(i) and v.dx(i)
which means that grad(u) can probably not be mapped to u.dx(i), but
rather to a function that takes the index as an argument (and ',' will
give the same index to both u.dx() and v.dx()).
You can introduce a class "grad" whose constructor takes a function,
and overload member __mul__ to take another "grad" instance and return
u.dx(i) * v.dx(i) for some appropriate index i. See above comment on
",".
Rob
Follow ups
References