← Back to team overview

yade-users team mailing list archive

Re: [Question #212834]: Contact number estimation

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hi Nait,

nIntrsOfBodyId = len(O.bodies[bodyId].intrs())

hoe often do you plan to use this method? As I remember, in the
implementation is such that there is loop over all interactions, so if you
want to use it for one specific body, it is ok, but if you want to use it
for all bodies, it would be inefficient and maybe there is another method
or we can add some.

Jan


2012/10/31 Nait <question212834@xxxxxxxxxxxxxxxxxxxxx>

> Question #212834 on Yade changed:
> https://answers.launchpad.net/yade/+question/212834
>
>     Status: Answered => Open
>
> Nait is still having a problem:
> To Chiara,
>
> Thanks for your answer, actually I am looking for the number of
> interaction of a specific body.
> But as I type in
>
> O.bodies[id_of_body].intrs
>
> YADE would return something like
>
> <bound method Body.intrs of <Body instance at 0xb41b968>>
>
> And as mentioned in the YADE document,
> "intrs() → list
> Return all interactions in which this body participates."
>
> I still don't understand how to obtain the number of contact of the
> specific body. Can you explain more?
>
> Thanks.
>
> Nait
>
> --
> 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@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.