← Back to team overview

ffc team mailing list archive

Re: Suggestions for changes [...]

 

>I updated the TODO list with two suggested changes for FFC.
>Tell me what you think.
>
>1. Projections
>--------------
>
>I'm thinking of adding projections to the language. A 
simple example:
>
>    P0 = FiniteElement("Discontinuous vector 
Lagrange", "tetrahedron", 0)
>    pi = Projection(P0)
>
>pi would then be a projection onto piecewise constants.
>
>This could be used to reduce the complexity of evaluating 
certain forms.
>If w is a Function, one can replace w with its projection 
in a form:
>
>    a = pi(w)*u.dx(i)*v.dx(i)*dx
>
This seems like a good thing to do, and makes the 
variational crime (projection) an explicit rather than 
assumed thing in the language.  It is good to not have that 
kind of semantic nuance.  Of course, we need a module for 
generating quadrature loop nests in place if we want to 
solve without the projection.  It would also be interesting 
to have nodal interpolants and L2 projections as separate 
things.  I don't know of any systematic explorations of 
which are better in practice, so it might be worth doing.


>2. Change .dx() --> .Dx()
>-------------------------
>
>Ridg suggested changing the notation for derivatives 
from .dx() to .Dx()
>to avoid confusion with the integration operator *dx. What 
do you think?
>Poisson would then change from
>
>    a = u.dx(i)*v.dx(i)*dx
>
>to
>
>    a = u.Dx(i)*v.Dx(i)*dx
>
I agree that something like this is helpful as it avoids 
overloading "dx".  But they differ only by case, so perhaps 
we should consider:
i.) u.deriv(i)
or
ii.) D(i)(u)

To be pedantic, in the second case, D is a higher order 
function that takes the coordinate direction and returns the 
function that differentiates a function in that direction.   

Rob





Follow ups