FFC

Question about integral data metadata design

Asked by Martin Sandve Alnæs

The integral data metadata member is created in ufl as just an empty dict, and filled and used by ffc with ffc specific metadata shared by integrals of the same domain type. The fact that this is created in ufl, stored in a ufl data structure, and only used and understood by ffc is a bit strange and confusing. I'm also not quite comfortable with the fact that the metadata ffc computes is attached to the form data. I'm redesigning the integral data a bit, and wonder if I really need to keep this. If I try to remove it from ufl and update ffc accordingly, will I hit some tricky half-hidden issue? It looks to me that FFC assumes it is empty to begin with in _attach_integral_metadata(). I think it boils down to this question:

Does FFC really need the metadata member of integral data to be persistently attached to form data?

If not there is no reason it should clutter the ufl data structures.

Question information

Language:
English Edit question
Status:
Solved
For:
FFC Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Anders Logg (logg) said :
#1

On Tue, Jan 29, 2013 at 09:15:52AM -0000, Martin Sandve Alnæs wrote:
> New question #220423 on FFC:
> https://answers.launchpad.net/ffc/+question/220423
>
> The integral data metadata member is created in ufl as just an empty dict, and filled and used by ffc with ffc specific metadata shared by integrals of the same domain type. The fact that this is created in ufl, stored in a ufl data structure, and only used and understood by ffc is a bit strange and confusing. I'm also not quite comfortable with the fact that the metadata ffc computes is attached to the form data. I'm redesigning the integral data a bit, and wonder if I really need to keep this. If I try to remove it from ufl and update ffc accordingly, will I hit some tricky half-hidden issue? It looks to me that FFC assumes it is empty to begin with in _attach_integral_metadata(). I think it boils down to this question:
>
> Does FFC really need the metadata member of integral data to be
> persistently attached to form data?
>
> If not there is no reason it should clutter the ufl data structures.

I think it could be a separate data structure. I suspect it is only
there for convenience so it can be passed around together with the
form and easily accessed from the form data.

--
Anders

Revision history for this message
Kristian B. Ølgaard (k.b.oelgaard) said :
#2

On 29 January 2013 11:15, Anders Logg
<email address hidden> wrote:
> Question #220423 on FFC changed:
> https://answers.launchpad.net/ffc/+question/220423
>
> Status: Open => Answered
>
> Anders Logg proposed the following answer:
> On Tue, Jan 29, 2013 at 09:15:52AM -0000, Martin Sandve Alnæs wrote:
>> New question #220423 on FFC:
>> https://answers.launchpad.net/ffc/+question/220423
>>
>> The integral data metadata member is created in ufl as just an empty dict, and filled and used by ffc with ffc specific metadata shared by integrals of the same domain type. The fact that this is created in ufl, stored in a ufl data structure, and only used and understood by ffc is a bit strange and confusing. I'm also not quite comfortable with the fact that the metadata ffc computes is attached to the form data. I'm redesigning the integral data a bit, and wonder if I really need to keep this. If I try to remove it from ufl and update ffc accordingly, will I hit some tricky half-hidden issue? It looks to me that FFC assumes it is empty to begin with in _attach_integral_metadata(). I think it boils down to this question:
>>
>> Does FFC really need the metadata member of integral data to be
>> persistently attached to form data?
>>
>> If not there is no reason it should clutter the ufl data structures.
>
> I think it could be a separate data structure. I suspect it is only
> there for convenience so it can be passed around together with the
> form and easily accessed from the form data.

It's there for convenience, it can be moved to FFC.

Kristian

> --
> Anders
>
> --
> You received this question notification because you are a member of FFC
> Team, which is an answer contact for FFC.

Revision history for this message
Martin Sandve Alnæs (martinal) said :
#3

ok