← Back to team overview

fiat team mailing list archive

Re: Evaluation of functionals

 

By "given function", do you mean an arbitrary input function (something that
supports __call__) or something in the finite element space?

Functionals know how to apply themselves to the finite-dimensional space
members via __call__ (it's just a dot product).

There is some preliminary support for the types of functionals in the
"get_type()" method.  It would need to be expanded to include some of this
other information.


On Dec 10, 2007 8:00 AM, Marie Rognes <meg@xxxxxxxxxxx> 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.
>
> 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?
>
> --
> Marie E. Rognes
> Ph.D Fellow,
> Centre of Mathematics for Applications,
> University of Oslo
> http://folk.uio.no/meg
>
> _______________________________________________
> FIAT-dev mailing list
> FIAT-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/fiat-dev
>

Follow ups

References