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

2009-02-05 Thread eudoxos
 a simple solution to avoid this (without modifying [mini]wm3) is to  
 change the user units.
 I think yade computation can be done with any system of units as they  
 are consistent.
 For example, one can use centimeters instead of meters and deca- 
 Newtons instead of Newtons and so on.
 But we must pay particular attention to the parameter values, eg. Kn  
 that was N/m becomes daN/cm.
 That is exactly what JJ Moreau was doing for his very high-precision  
 computations on old apple.
 I think that people that perform MD simulations (with atom-sized  
 particles) do the same.

Want repeat this one? http://www.cnn.com/TECH/space/9909/30/mars.metric/

Seriously, for myself I will never use anything else than basic SI units
since it is very easy to do mistake. Dimensionless quantitites don't scale
with units anyway (like strains or angles). I would prefer to fix that in
Wm3 (or Wm4, for that matter) or switch to another lib -- but I didn't find
anything quite suitable. Have a look at e.g.
http://www.ohloh.net/tags/3d/math.

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?

Vaclav 


___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


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

2009-02-05 Thread Janek Kozicki
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 |

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp