New question #258987 on Yade: https://answers.launchpad.net/yade/+question/258987
There's a problem in O,.bodies when we delete some particles during simulation. Or if we use replaceByClumps() (because in replaceByClumps also a ball is deleted and replaced by a clump). In these case, if we then want to iterate over bodies we get an error because O.bodies() has not been updates and there're some ids with no physical body. for example after using replaceByClumps(), I'd like to use calm() function in pyrunner as def calm(): for ii in range(1,(len(O.bodies)-1)): O.bodies[ii].state.vel=Vector3(0,0,0) but the function crashes because some bodies are missing. This can be solved by: 1- if there's a function to check the existence of a body 2- if we can update O.bodies Do you guys have any idea about this? Thanks Behzad -- You received this question notification because you are a member of yade-users, which is an answer contact for Yade. _______________________________________________ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp