← Back to team overview

fiat team mailing list archive

Re: Evaluation of functionals

 

On Mon, Dec 10, 2007 at 03:00:24PM +0100, Marie Rognes wrote:
> 
> 
> We would like to evaluate the degrees of freedom on a given function in 
> ffc. In order to do that with relative easy, it would be very handy if 
> we could extend the current information about the dual bases in FIAT.
> 
> We were thinking that if we could represent functionals in terms of 
> three attributes, 'points', 'components' and 'weights', then it would be 
> very easy to generate code for the evaluation of these in ffc.

Just a comment. We need this because we generate code for the UFC
function evaluate_dof which is called at run-time to interpolate
user-defined functions (like coefficients, right-hand sides) to the
finite element space.

-- 
Anders



> Some examples for the motivation for the choice of representation
> 
>     Example 1: L = Point evaluation at component k:
> 
>        weights = [1]
>        components = [k]
>        points = [p_0]
> 
>     Then given a function f, we want
> 
>        L(f) = 1*f[k](p_0)
> 
>     Example 2: L = Normal component at diagonal edge:
> 
>        weights = [1, 1]
>        components = [0, 1]
>        points  = [p]
> 
>     Then
> 
>        L(f) = [1, 1]*(f[0](p), f[1](p)) = 1*f[0](p) + 1*f[1](p)
> 
>     Example 3: L = Integral over interior of component k:
> 
>        weights, points = make_quadrature(...)
>        components = [k]
> 
>        L(f) = [w_0, ... w_m] (f[k](p_0), .... ,f[k](p_m))
>             = sum_j w_j f[k](p_j)
> 
> 
> Maybe the finite elements/dual bases in FIAT could supply this 
> information in addition to the 'entity_ids'?
> 
> I was thinking something along the lines of letting the Functional class 
> have the additional attributes, and initializing these when constructing 
> the dual bases.
> 
> If there are some attributes that don't apply (such as weights and 
> component for scalar Lagrange elements), these could of course be left 
> empty.
> 
> How does this sound?
> 


References