ufl team mailing list archive
-
ufl team
-
Mailing list archive
-
Message #00594
Re: abs
On Fri, Jan 2, 2009 at 4:00 PM, Marie Rognes <meg@xxxxxxxxxxx> wrote:
> Garth N. Wells wrote:
>> Martin Sandve Alnæs wrote:
>>
>>> UFL supports absolute values of any scalar expression.
>>>
>>>
>>
>> Very good. It's not currently supported by FFC.
>>
>
> It is, it is just called 'modulus'. Overriding the python builtin
> caused some issues a while back...
The right way to override abs(foo) in Python is to implement
__abs__(self) in FooType. Don't know if that helps.
Martin
References
-
abs
From: Garth N. Wells, 2008-12-31
-
Re: abs
From: Martin Sandve Alnæs, 2009-01-01
-
Re: abs
From: Garth N. Wells, 2009-01-01
-
Re: abs
From: Marie Rognes, 2009-01-02