yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #02649
Re: Run Engine in PeriodicRunner()
BTW, could you tell what the variable "thread" corresponds to?
thanks, Chiara
On 23 March 2010 17:12, chiara modenese <c.modenese@xxxxxxxxx> wrote:
> Hi all,
>
> I was trying to use PeriodicPythonRunner() to run an Engine. I defined a
> function to be called in PreiodicRunner() as something like:
>
> def shearForce():
> if (O.iter>300):
> i=O.interactions[0,1]
> O.runEngine(ForceEngine(force=(0,0,3e5),subscribedBodies=[0]))
>
> Well, something strange happened. I mean, it is like if forces.sync()
> function was called twice and so the code was ending up with the wrong force
> in the NewtonIntegrator. I can say this because I was getting different
> results when calling O.forces.f() and printing out in the screen the force
> used in NewtonIntegrator to get the acceleration (they should look the same,
> right?). Ever had this problem? How this PreriodicPythonRunner() works?
> There is something I am escaping.
>
> cheers, Chiara
>
References