| Thread Previous • Date Previous • Date Next • Thread Next |
------------------------------------------------------------ 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.
| Thread Previous • Date Previous • Date Next • Thread Next |