← Back to team overview

yade-users team mailing list archive

Re: [Question #407567]: the global cannot work

 

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

    Status: Open => Answered

Klaus Thoeni proposed the following answer:
Sorry, your script fragments don't make sense to me. If you want to
delete particles from a simulation you should use this [1]:

O.bodies.erase(my_body_id_to_delete)

If you want to remove elements from a python list use the corresponding
python command (e.g., mylist.pop(id_to_remove), or
mylist.remove(id_to_remove)). Have a look at the python documentation.

HTH
Klaus

[1] https://yade-
dem.org/doc/yade.wrapper.html?highlight=erase#yade.wrapper.BodyContainer.erase

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