← Back to team overview

ufl team mailing list archive

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