yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #12648
[Branch ~yade-pkg/yade/git-trunk] Rev 3856: Fix crash in polyhedra, if maxFs=0.
------------------------------------------------------------
revno: 3856
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Thu 2016-04-28 14:51:32 +0200
message:
Fix crash in polyhedra, if maxFs=0.
Thanks Jan for discussion.
modified:
pkg/dem/Polyhedra.cpp
--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'pkg/dem/Polyhedra.cpp'
--- pkg/dem/Polyhedra.cpp 2016-04-27 08:59:57 +0000
+++ pkg/dem/Polyhedra.cpp 2016-04-28 12:51:32 +0000
@@ -507,6 +507,7 @@
"elastPotential",elastPotentialIx,true);
}
} else {
+ if (maxFs==0) shearForce = Vector3r::Zero();
scene->energy->add(0.5*(normalForce.squaredNorm()/phys->kn+shearForce.squaredNorm()/phys->ks),
"elastPotential",elastPotentialIx,true);
}