yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #03170
Re: Delete an engine during simulation
> Is it possible to delete one of engines during simulation?
> For example, I want to have translation engine during first 1000
> iterations, then I do not need it.
> Can I do that using python?
O.engines=O.engines[:2]+O.engines[3:0]
will remove the 3rd engine, for example. You should not do it from
within the engine loop (didn't try, but that is what I guess), see
https://yade-dem.org/sphinx/user.html#checkpoints in the warning -- make
separate function that will wait for the step to finish, then remove the
engine, then call run() again.
HTH, Vaclav
Follow ups
References