yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #18854
Re: [Question #678125]: silulation can not quit
Question #678125 on Yade changed:
https://answers.launchpad.net/yade/+question/678125
Status: Open => Answered
Jan Stránský proposed the following answer:
Hello,
O.run() [2] just runs.. To stop, you have several options:
1) call O.pause() manually [1]
2) run specific number of time steps "hardcoded" in O.run [2]
O.run(1000) or O.run(1000,True)
3) use O.stopAt*[3,4]
O.stopAtIter = 1000
O.run()
4) use another function in PyRunner and call O.pause (similar to what you do in checkUnbalanced):
###
def checkStopCondition():
if yourConditionToStop:
O.pause()
...
O.engines = [
...
PyRunner(iterPeriod=1000,command="checkStopCondition()")
###
cheers
Jan
[1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Omega.pause
[2] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Omega.run
[3] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Omega.stopAtIter
[4] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Omega.stopAtTime
--
You received this question notification because your team yade-users is
an answer contact for Yade.