yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #08152
[Branch ~yade-dev/yade/trunk] Rev 2979: Do not let PWaveTimeStep return "infinity"
------------------------------------------------------------
revno: 2979
fixes bug: https://launchpad.net/bugs/901146
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: yade
timestamp: Wed 2011-12-07 13:49:19 +0100
message:
Do not let PWaveTimeStep return "infinity"
modified:
pkg/dem/Shop.cpp
--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'pkg/dem/Shop.cpp'
--- pkg/dem/Shop.cpp 2011-11-30 14:39:48 +0000
+++ pkg/dem/Shop.cpp 2011-12-07 12:49:19 +0000
@@ -421,6 +421,10 @@
Real density=b->state->mass/((4/3.)*Mathr::PI*pow(s->radius,3));
dt=min(dt,s->radius/sqrt(ebp->young/density));
}
+ if (dt==std::numeric_limits<Real>::infinity()) {
+ dt = 1.0;
+ LOG_WARN("PWaveTimeStep has not found any suitable spherical body to calculate dt. dt is set to 1.0");
+ }
return dt;
}