← Back to team overview

ufl team mailing list archive

Re: [Branch ~ufl-core/ufl/main] Rev 967: Update repr string in set_cell and set_degree, fixes strange cache problem.

 

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.

--
Martin

2011/3/12 Anders Logg <logg@xxxxxxxxx>:
> On Sat, Mar 12, 2011 at 10:12:43AM +0000, Garth N. Wells wrote:
>>
>>
>> On 12/03/11 09:58, Anders Logg wrote:
>> > Will fix.
>> >
>>
>> I fixed one bug, but one remains.
>
> I know, working on it.
>
> --
> Anders
>
>
>> Garth
>>
>> >> This change has broken the FFC tests.
>> >>
>> >> Garth
>> >>
>> >> On 11/03/11 20:28, noreply@xxxxxxxxxxxxx wrote:
>> >>> ------------------------------------------------------------
>> >>> revno: 967
>> >>> committer: Anders Logg <logg@xxxxxxxxx>
>> >>> branch nick: ufl-main
>> >>> timestamp: Fri 2011-03-11 21:26:25 +0100
>> >>> message:
>> >>>   Update repr string in set_cell and set_degree, fixes strange cache problem.
>> >>> modified:
>> >>>   ChangeLog
>> >>>   ufl/finiteelement.py
>> >>>
>> >>>
>> >>
>> >> _______________________________________________
>> >> Mailing list: https://launchpad.net/~ufl
>> >> Post to     : ufl@xxxxxxxxxxxxxxxxxxx
>> >> Unsubscribe : https://launchpad.net/~ufl
>> >> More help   : https://help.launchpad.net/ListHelp
>
> _______________________________________________
> Mailing list: https://launchpad.net/~ufl
> Post to     : ufl@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ufl
> More help   : https://help.launchpad.net/ListHelp
>



-- 
Martin



Follow ups

References