← Back to team overview

ffc team mailing list archive

Re: Absolute value difficulties.

 

Anders Logg wrote:
Looks good, but why do you need this?


For instance after doing:

   from dolfin import *
   a = -1.0
   f = abs(a)
f is now a Form...

--
Marie
/Anders


Marie Rognes wrote:
Kristian Oelgaard wrote:
The next problem is

     >>> ffc.abs(1) < 0.001
    True


which is a bit more puzzling for me in itself and in how to fix.

Anyone want to take a look?
ffc.abs(1)

returns a Form
try
ffc.abs(1).__doc__

what you could do is
f = ffc.Form(1)
f.monomials[0].numeric < 0.001
which will be false

In other words - the most sensible thing to do would be to implement less-than and greather-than for Forms in the above manner?

Will do, unless anyone objects.

--
Marie

_______________________________________________
FFC-dev mailing list
FFC-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/ffc-dev



Follow ups

References