← Back to team overview

ffc team mailing list archive

Re: Status (again)

 


Anders Logg wrote:
> On Thu, Jan 28, 2010 at 08:28:22PM +0000, Garth N. Wells wrote:
>>
>> Anders Logg wrote:
>>> On Thu, Jan 28, 2010 at 09:14:36PM +0100, Marie Rognes 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?
>>>>
>>>> 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?
>>>
>> It's possible that it could be integrated over the interior, but
>> probably not very sensible.
>>
>> I think that FacetElement is a bit misleading, since what it does is
>> just take the dofs of a cell that live on the facets. With FacetElement
>> I think of an element of topological dim 2 embedded in 3D.
> 
> I thought that was the idea.
> 
> Exactly what does it do?
>

I use it for functions that live on cell facets only. Nothing special is
required for k <= 2, but it's needed for k > 2 to eliminate internal dofs.

Garth

> --
> Anders





References