yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #12088
[Branch ~yade-pkg/yade/git-trunk] Rev 3678: Skip force calculation in SPH-clump
------------------------------------------------------------
revno: 3678
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Thu 2015-06-11 09:54:08 +0200
message:
Skip force calculation in SPH-clump
modified:
pkg/common/SPHEngine.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/common/SPHEngine.cpp'
--- pkg/common/SPHEngine.cpp 2015-06-10 11:04:02 +0000
+++ pkg/common/SPHEngine.cpp 2015-06-11 07:54:08 +0000
@@ -225,8 +225,15 @@
const int id1 = I->getId1();
const int id2 = I->getId2();
+
const BodyContainer& bodies = *scene->bodies;
+ if (bodies[id1]->clumpId!=bodies[id2]->clumpId) {
+ //If 2 bodies belong to the same clump, do not calculate forces
+ force = Vector3r::Zero();
+ return true;
+ }
+
//////////////////////////////////////////////////////////////////
// Copy-paste
// Handle periodicity.