yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #09832
Re: [Question #251510]: Loop - array -->Find out the strength needed to move each particle
Question #251510 on Yade changed:
https://answers.launchpad.net/yade/+question/251510
Status: Open => Answered
Jan Stránský proposed the following answer:
Hello,
first of all, I did not get at all what you are trying to achieve :-)
anyway:
>
> for xx in range(0,len(array1)):
> id_clump=O.bodies[array1[xx][0]] # [0] --> column
> Id array1
>
as the error message says, id_clump is now instance of Body (not its id!),
that's why its usage in addForce function fails. Try
id_clump=O.bodies[array1[xx][0]].id
HTH
Jan
--
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.