ufl team mailing list archive
-
ufl team
-
Mailing list archive
-
Message #01975
Re: Change in behaviour of "unknown"
I did some changes and want FFC to be updated to follow this, but I
did it in a non-breaking way. Let me explain.
test.ufl:
V = FiniteElement("CG", triangle, 1)
unknown = Coefficient(V)
Interactive python session:
In [1]: from ufl.algorithms import load_ufl_file
In [2]: filedata = load_ufl_file("test.ufl")
In [3]: filedata.object_names
Out[3]:
{24282848: 'V',
24339344: 'unknown',
'unknown': Coefficient(FiniteElement('Lagrange', Cell('triangle',
Space(2)), 1, None), 0)}
In [4]: filedata.reserved_objects
Out[4]: {'unknown': Coefficient(FiniteElement('Lagrange',
Cell('triangle', Space(2)), 1, None), 0)}
In [5]: filedata.object_by_name
Out[5]:
{'V': FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None),
'unknown': Coefficient(FiniteElement('Lagrange', Cell('triangle',
Space(2)), 1, None), 0)}
I want to remove 'unknown' from the 'object_names' so that
it is in fact a mapping from id(object) to name of object.
I have not removed it as you can see above, but have added
another dict 'reserved_objects' which currently only holds
'unknown' if it is present. There is a list of reserved names
that can easily be extended. It would be nice if FFC could
update to this change so I can remove 'unknown' from object_names.
Martin
On 29 June 2011 10:51, Martin Sandve Alnæs <martinal@xxxxxxxxx> wrote:
> What has changed?
>
> Martin
>
>
> On 28 June 2011 21:50, Marie E. Rognes <meg@xxxxxxxxx> wrote:
>>
>>
>> Sometime between Tuesday 11-06-07 at approx 02.20 and now it seems that the
>> handling of the reserved variable name "unknown" in form files has changed.
>> Does anyone know anything about this?
>>
>> --
>> Marie
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~ufl
>> Post to : ufl@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~ufl
>> More help : https://help.launchpad.net/ListHelp
>>
>
Follow ups
References