← Back to team overview

ffc team mailing list archive

Re: slight modification of FFC and UFL

 

It might be easiest to have FFC generate code for a specific type of geometry function. The function can be anything, but FFC would make the code for a specific type (say, lagrange 3rd order). And then the user would `attach' this function somehow to the form. I would also suggest just making all the cells have higher order geometry (for now) than try to worry about having an if-then in the code to decide on how to compute the jacobian. That can be cleaned up later.

I would like to point out that evaluating the basis functions and derivatives is not completely straightforward. Even determining what cell a point belongs to may be difficult, although maybe this isn't such a big deal. One could just find the cell assuming everything is straight and just accept the possible error.

But even if you find the right cell, you need to map that point to the reference cell first, because you really only know the basis functions on the reference cell (when dealing with iso-parametric stuff). But mapping that point will require a non-linear solve (unless I am missing something obvious).

- Shawn

On Tue, 1 Sep 2009, Peter Brune wrote:

So, I took a short break from this, but I'm back at it today and have a couple questions:

1. Why do we not put the metadata for the integral as part of its string description?  This is a one-line
change, but I was wondering what the reason for reconstructing the integrals without metadata was.
2. Eventually, this all will require other things like the evaluate_basis_derivative functions to either know
about the coordinates, or to have some sort of a second implementation when associated with a form
(potentially with multiple types of coordinates)
3. By calculating the jacobian in this create_*, ... I'm not quite getting what you're thinking.  Do you have
an organizational idea for this that I'm not seeing?  Right now I'm appending a coordinate coefficient to
forms with coordinate metadata, and am working on getting it to generate the jacobian in such a way I could
use it. 
4.  Two options: either generate the Jacobian like we do now as a codesnippet and apply it, OR create a
preprocessing transformation-aware transformer that puts the gradient of the coefficient in ALL the right
places (because we're doing this in FFC and know what the basis functions transform like now).  I'm leaning
towards the second because I've already sort of done it once, and I don't see how one would be slower than
the other.   This might make the above problem with the other evaluation functions becoming harder.

Thoughts?

- Peter


References