← Back to team overview

yade-users team mailing list archive

Re: [Yade-dev] Be carefull with "normalize"

 

eudoxos said:     (by the date of Thu, 05 Feb 2009 15:38:08 +0100)

> Want repeat this one? http://www.cnn.com/TECH/space/9909/30/mars.metric/
> 
> And I still think that the tolerance value has nothing to do with
> precision. NUmber of decimal places is the same for 1e-20 and for 1e20. But
> the tolerance must scale with that, that is the only problem, as I see it.
> How anout making ZERO_TOLERANCE and let the user set it to some reasonable
> value according to the particle size, timestep, etc?

Let's just set it to zero. And either:

1. put a std::cerr warning when a division by zero is detected or
2. remove the check altogether, let it divide by zero and crash.

I prefer 2nd option. Much safer.


Units have nothing to do with that.

-- 
Janek Kozicki                                                         |



Follow ups

References