Subject: Re: [UFC-dev] [DOLFIN-dev] [HG dolfin] Merge.

From: Anders Logg <[email-masked]>
Date: Tue, 16 Jan 2007 22:05:27 +0100

On Tue, Jan 16, 2007 at 09:15:12PM +0100, Johan Jansson wrote:
> On Tue, Jan 16, 2007 at 09:04:31PM +0100, Anders Logg wrote:
> > Looks good, but this might not be needed with the UFC-based assembly.
> > 
> > The current BilinearForm interface for evaluation of the element
> > tensor looks like this:
> > 
> >     void eval(real block[],
> >               const AffineMap& map,
> >               real det) const;
> > 
> > but the corresponding UFC interface looks like this:
> > 
> >     void tabulate_tensor(double* A,
> >                          const double * const * w,
> >                          const ufc::cell& c) const;
> > 
> > A is the same as block.
> > 
> > w is a list of expansion coefficients for the functions in the form,
> > and corresponds to the member data c in BilinearForm.
> > 
> > The AffineMap and determinant are no longer arguments to the
> > tabulate_tensor (eval) function, since they may not be needed, so the
> > generated code will need to compute the affine map and the determinant
> > when they are needed.
> > 
> > Perhaps the AffineMap will be needed for other things, but it won't be
> > needed for the generated code.
> > 
> > /Anders
> > 
> 
> Ok good, I was just about to write a mail asking about this. Right now
> I'm looking at evaluation of basis functions on physical cells. The
> plan is to define a few common basis functions on the reference cell
> and just map them. But all of this will be obsoleted by UFC, as you
> just verified. It's probably still worth doing (because it's needed
> right now), but it's always good to know what's planned ahead.

There is also a function

    void evaluate_basis(double* values,
                        const double* coordinates,
                        unsigned int i,
                        const cell& c) const;

that can be used for run-time evaluation of basis functions at
arbitrary points.

I'm cc:ing to the ufc-dev mailing list with a suggestion: I suggest we
reorder the arguments so that the argument 'unsigned int i' is the
first argument (basis function number i).

/Anders