← Back to team overview

yade-dev team mailing list archive

Re: NaN problem solved

 

Please, make it an assert or anything that will be disabled in release build.
This thing is not supposed to happen in production.

Bruno


On 20/10/10 09:27, Vaclav Smilauer wrote:
It would have been (a lot) easier to find if there was such a code:
I would suggest to check that norm==0 (sharp float comparison) and throw
an exception with a more detailed explanation --

  if(norm==0) throw runtime_error(("Zero distance between spheres #"+lexical_cast<string>(c->getId1())+" and #"+lexical_cast<string>(c->getId2())+".").c_str())

Cheers, v.



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



--
_______________
Bruno Chareyre
Associate Professor
ENSE³ - Grenoble INP
Lab. 3SR
BP 53 - 38041, Grenoble cedex 9 - France
Tél : +33 4 56 52 86 21
Fax : +33 4 76 82 70 43
________________




Follow ups

References