← Back to team overview

ffc team mailing list archive

Re: Status (again)

 



On 28 January 2010 21:14, Marie Rognes <meg@xxxxxxxxx> wrote:
Kristian Oelgaard wrote:


2010/1/27 Medhi Nikbakht <m.nikbakht@xxxxxxxxxx>:

On Wed, 2010-01-27 at 15:50 +0100, Marie Rognes wrote:

FFC compilation fails for

   ElementRestriction.ufl

The error message says that "ElementRestriction" is not supported by
FIAT.
How will the restricted elements be implemented? Wouldn't it be better
to support them inside FFC?

There are two types of restrictions supported in UFL (and the old FFC).
1) Restriction onto Measure (like 'dc'), which is what you want.
2) Restriction onto Cell, as for instance restricting a Lagrange element
defined on a 'triangle' to its facets.

The third restriction that we might want in the future is restriction onto
subdomains possible in UFL but not in FFC.

To implement 1) I think it is enough to just attach the Measure as a
member to the fiat_element and the simply look for it in appropriate places
when generating the code. That means handle it in FFC.fiatinterface, could
that work?

To implement 2) I modified the return value of entity_dofs() and
tabulate() accordingly. To do it this way again we will need to make changes
in FIAT_NEW.FiniteElement and FFC.MixedElement. I'm not sure it is a good
idea to make FIAT_NEW.PolynomialSet aware of restrictions, but I don't know
enough about the FIAT internals to back up this claim.



How about adding a class RestrictedElement that contains an element and
(based on the restriction)
a list of relevant basis function indices, and overrides the methods as
FiniteElement/MixedElement?

Yes, that would be one option and we already have MixedElement and RestrictedElement is much the same thing (we should change the name in UFL). Although, one objective of this re-write of FFC was to remove as much as possible w.r.t. FiniteElement.

We could make the RestrictedElement a child class of FIAT.FiniteElement, that should be OK since FFC uses FIAT as the backend for finite elements. Then we just need to modify a few member functions.

Kristian

No need to make FIAT aware of this.

--
Marie


I'm not really sure how to handle the restriction onto subdomains, but it
should most likely be implemented in FFC.

Kristian

Mehdi

   QuadratureElement.ufl
   TensorWeightedPoisson.ufl

Running test programs fails for

   P5tet.bin    (Segmentation faults after evaluate_basis(0, ...)

Differences in output

   evaluate_basis*

   FacetIntegrals.out      (missing value in generated code (many))
   SubDomain.out            (missing value in generated code
(tabulate_tensor))


Others:

   tabulate_entity_dofs     (errors thrown are all wrong. Marie will
fix)


--
Marie


_______________________________________________
Mailing list: https://launchpad.net/~ffc
Post to     : ffc@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~ffc
More help   : https://help.launchpad.net/ListHelp


_______________________________________________
Mailing list: https://launchpad.net/~ffc
Post to     : ffc@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~ffc
More help   : https://help.launchpad.net/ListHelp





Attachment: signature.asc
Description: OpenPGP digital signature


Follow ups

References