On Thu, Jan 28, 2010 at 09:14:36PM +0100, Marie Rognes wrote: > Kristian Oelgaard wrote: > > > > > >2010/1/27 Medhi Nikbakht <[email protected]>: > >>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? > > No need to make FIAT aware of this.
This sounds good. I think I understand (somewhat) what (2) is supposed to do, but not (1). And as Garth suggests, I think a better name is FacetElement. Does a FacetElement know that it can only be integrated over facets, not the interior, or can it? -- Anders
signature.asc
Description: Digital signature
_______________________________________________ Mailing list: https://launchpad.net/~ffc Post to : [email protected] Unsubscribe : https://launchpad.net/~ffc More help : https://help.launchpad.net/ListHelp

