ufl team mailing list archive
-
ufl team
-
Mailing list archive
-
Message #01727
Re: [Branch ~ufl-core/ufl/main] Rev 967: Update repr string in set_cell and set_degree, fixes strange cache problem.
-
To:
Martin Sandve Alnæs <martin.alnes@xxxxxxxxx>
-
From:
"Garth N. Wells" <gnw20@xxxxxxxxx>
-
Date:
Sat, 12 Mar 2011 10:54:02 +0000
-
Cc:
ufl@xxxxxxxxxxxxxxxxxxx
-
In-reply-to:
<AANLkTikRBpyn8irr9ukiJNdUg0YWWPrXP0-Ajqn=y=Rm@mail.gmail.com>
-
User-agent:
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8
I've registered this as a bug,
https://bugs.launchpad.net/ufl/+bug/733774
The discussion will get lost on the list.
Garth
On 12/03/11 10:49, Martin Sandve Alnæs wrote:
> I don't have time now either, but I think it can be done easier:
>
> Find all arguments and coefficients in form or expression.
>
> Make new ones and make a dict mapping from old to new.
>
> Use the existing function replace().
>
> Martin
>
> Den 12. mars 2011 11.44 skrev "Anders Logg" <logg@xxxxxxxxx
> <mailto:logg@xxxxxxxxx>> følgende:
>> On Sat, Mar 12, 2011 at 11:41:23AM +0100, Martin Sandve Alnæs wrote:
>>> They should be removed. If used on an element used by an expression,
> subtle
>>> incorrectness issues will appear, sometimes... Cache issues are only
> a symptom
>>> here, the real problems will be wrong results with no crash.
>>
>> Yes I agree, no objections. The only problem is someone needs to write
>> a transformer that replaces the element degree/shape throughout a form
>> and I won't have time to dig into that just now.
>>
>> --
>> Anders
>>
>>
>>> Martin
>>>
>>> Den 12. mars 2011 11.36 skrev "Anders Logg" <logg@xxxxxxxxx
> <mailto:logg@xxxxxxxxx>> f lgende:
>>> > On Sat, Mar 12, 2011 at 11:28:15AM +0100, Martin Sandve Aln s wrote:
>>> >> Changing repr is incorrect, and the bugs you're finding will never
> end.
>>> >>
>>> >> It is a fundamental design choice in UFL to make everything
>>> >> immutable, and the repr strings can never change. This is a
>>> >> critical property for lots of things to work, and it is assumed
>>> >> all over the place. It cannot ever be changed.
>>> >>
>>> >> Instead of modifying an UFL object, always create a
>>> >> new one with the changes you want. This is how every
>>> >> algorithm in UFL works, and this is how every future
>>> >> algorithm working on UFL objects must work.
>>> >
>>> > ok, good point.
>>> >
>>> > The reason for these changes are the two functions set_cell and
>>> > set_degree in the finite element classes, which are used to set the
>>> > cell and degree of an element when they are unspecified ("?"). They
>>> > have been around for a long time.
>>> >
References
-
Re: [Branch ~ufl-core/ufl/main] Rev 967: Update repr string in set_cell and set_degree, fixes strange cache problem.
From: Garth N. Wells, 2011-03-12
-
Re: [Branch ~ufl-core/ufl/main] Rev 967: Update repr string in set_cell and set_degree, fixes strange cache problem.
From: Anders Logg, 2011-03-12
-
Re: [Branch ~ufl-core/ufl/main] Rev 967: Update repr string in set_cell and set_degree, fixes strange cache problem.
From: Garth N. Wells, 2011-03-12
-
Re: [Branch ~ufl-core/ufl/main] Rev 967: Update repr string in set_cell and set_degree, fixes strange cache problem.
From: Anders Logg, 2011-03-12
-
Re: [Branch ~ufl-core/ufl/main] Rev 967: Update repr string in set_cell and set_degree, fixes strange cache problem.
From: Martin Sandve Alnæs, 2011-03-12
-
Re: [Branch ~ufl-core/ufl/main] Rev 967: Update repr string in set_cell and set_degree, fixes strange cache problem.
From: Anders Logg, 2011-03-12
-
Re: [Branch ~ufl-core/ufl/main] Rev 967: Update repr string in set_cell and set_degree, fixes strange cache problem.
From: Martin Sandve Alnæs, 2011-03-12
-
Re: [Branch ~ufl-core/ufl/main] Rev 967: Update repr string in set_cell and set_degree, fixes strange cache problem.
From: Anders Logg, 2011-03-12
-
Re: [Branch ~ufl-core/ufl/main] Rev 967: Update repr string in set_cell and set_degree, fixes strange cache problem.
From: Martin Sandve Alnæs, 2011-03-12