BTW, a c++ question. Why are looping here over all the interactions if
this is done in the interaction dispatcher? Sorry I am still learning :)
Law2_ScGeom_FrictPhys_Basic is not inheriting from a periodic engine..
cheers, Chiara
plasticWork is never reset (except if the user write in python
plasticWork=0 at some point). In functor::go(), you increment it at each
contact and each iteration. It is defined for the [0,t] time interval.
On the other hand, elastic work is defined for time "t", there is no
history. You have to make it 0 somewhere outside the FOREACH loop, each
time you compute the current value.
In fact, I had no clue where to put this elasticEnergy=0. It should have
been in interaction dispatcher... or checking current timestep inside
the functor to make sure we reset only once per step... way too complex
for such a simple task.
Thats why I choosed to make it a standalone function with its own
FOREACH loop. It will be computed on demand.
Bruno
_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help : https://help.launchpad.net/ListHelp