← Back to team overview

yade-users team mailing list archive

Re: [Question #662183]: when/how use O.run()

 

Question #662183 on Yade changed:
https://answers.launchpad.net/yade/+question/662183

    Status: Open => Answered

Robert Caulk proposed the following answer:
Hello,

O.run([(int)nSteps=-1[, (bool)wait=False]]) is used to run your
simulation according to a few arguments  [1]:

nSteps: indicates the number of steps  for which Yade should run (nSteps=-1 will run simulation indefinitely)
wait: tells Yade whether or not to wait for the run command to finish before moving to the next line in your python script. 

O.run does not loop over your python script. The python script executes
line by line, and when it gets to O.run(), it executes it according to
the arguments described above.

For example, in (***[1]) your simulation will run for 1000 steps, and it
will wait till these steps are completed before returning to the python
script to check the unbalanced force.

Timing.stats() [2] simply gives you information about how much time Yade
has spent in each of your engines at the time of the call to
timing.stats(). So running timing.stats() after running O.run() will
give you the current total timing.stats() for the simulation so far.

Cheers,

Robert

[1]https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Omega.run
[2]https://yade-dem.org/doc/yade.timing.html#yade.timing.stats

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.