yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #00937
Re: [Yade-users] Be carefull with "normalize"
-
To:
yade-dev@xxxxxxxxxxxxxxxxxxx, yade-users@xxxxxxxxxxxxxxxxxxx
-
From:
Janek Kozicki <janek_listy@xxxxx>
-
Date:
Thu, 5 Feb 2009 16:39:29 +0100
-
Face:
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEUBAQEtLS1KSkpRUVFXV1dYWFhjY2Nzc3N3d3eHh4eKioqdnZ24uLjLy8vc3NxVIagyAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH2AIVEzgS1fgQtQAAAjRJREFUOMtt1DFv00AUAOAzFQNbjigSyoQaRaBMhKgLUyKXpVNNeUpk9vyDqFJhQ1kiBuaqAwJCqvPtSLY7RlTn5+5IdnYkkt/AOyfxXVLe5vf53Z1875kd34tOEax8djmj6GyjhB5bxz50GdsVZr9fqRjZwAtKOJw5Wqs2MMZ16ALHsaDncF7xAHix1oEFHAB8f+pRjcO4gfZDykcYzbiucRolOLUJ6kjA0xtVt+A6TySlM0RajIpK6DzwKZ/nOYbF/gclHMo1ZOHYY/+Ha+AWuM+3oMS4eeqYzZ8FiCltgUqI8cd2wwAVpJk+8LWYjBtnJdQpHQqJMd4Oxt4bU9ESiFGc5hkqaH74asAX4iabP5I5gZ+qjgGlJCqZa3h3lxhoeVcSE1qLQC4sqKOK9MGW9E3izFqqHokoztLFEgXg31sbZEKnWi2T74A4NxfVQqlkjKtcAWD+zcArFEES01dR0E/nnV0IgugmDd/2L84sOAouRBBHEc7gtc8teDkRlE0iNQPo2w3Xhh/D4TCIQ4LRLoTvgwjj6RRgavdurxYGMaIuGOyAW/PpNlCcU9/93AHenAWYjPoAwa+G3e3to/MgFNTAEKvKDjzuCzHTnY3qqdXtx24VijzQfZ0yewZ5cwRFQaa+mIYr1uI0I76+3W4xhlvoVRwOA0Fdl64HlJnxP6T8YpX/Lga4Wv4A3ErrU5oTfN7Mu/llXMl8RXEPji/lQkN3H7qXqgC2By47EXeU/7PJ/wPxRKMnuZwIeAAAAABJRU5ErkJggg==
-
In-reply-to:
<c0cd46774453930eae49ef179e10127c@arcig.cz>
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 |
References