yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #10830
[Branch ~yade-pkg/yade/git-trunk] Rev 3956: Revert last change in Newtonintegrator.
------------------------------------------------------------
revno: 3956
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Fri 2014-05-16 13:48:12 +0200
message:
Revert last change in Newtonintegrator.
modified:
pkg/dem/NewtonIntegrator.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/NewtonIntegrator.cpp'
--- pkg/dem/NewtonIntegrator.cpp 2014-05-16 09:46:02 +0000
+++ pkg/dem/NewtonIntegrator.cpp 2014-05-16 11:48:12 +0000
@@ -148,6 +148,14 @@
b->shape->cast<Clump>().addForceTorqueFromMembers(state,scene,f,m);
scene->forces.addTorque(id,m);
scene->forces.addForce(id,f);
+ #ifdef YADE_OPENMP
+ //it is safe here, since only one thread will read/write
+ scene->forces.getTorqueUnsynced(id)=m;
+ scene->forces.getForceUnsynced(id)=f;
+ #else
+ scene->forces.addTorque(id,m);
+ scene->forces.addForce(id,f);
+ #endif
}
//in most cases, the initial force on clumps will be zero and next line is not changing f and m, but make sure we don't miss something (e.g. user defined forces on clumps)
f=scene->forces.getForce(id); m=scene->forces.getTorque(id);