← Back to team overview

yade-dev team mailing list archive

Energy tracing vs. multithread?

 

Hi Vaclav,

I was wondering if something bad could happen in Law2_ScGeom_FrictPhys_Basic in case of multithreaded simulation.
We have a functor attribute "plasticDissipation" and in go() we have :

plasticDissipation +=
(shearDisp+(1/currentContactPhysics->ks)*(shearForce-prevForce))//plastic disp.

What will happen if two threads increment the value at the same time?

Bruno


--
_______________
Bruno Chareyre
Associate Professor
Grenoble INP
Lab. 3SR
BP 53 - 38041, Grenoble cedex 9 - France
Tél : 33 4 56 52 86 21
Fax : 33 4 76 82 70 43
________________




Follow ups