yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #10869
Re: [Question #261928]: number of interactions is not correct!
Question #261928 on Yade changed:
https://answers.launchpad.net/yade/+question/261928
Status: Open => Answered
Jan Stránský proposed the following answer:
Hi Behzad,
len(O.interactions) also consideres potential interactions (when bounding
boxes collides)
if you use "for i in O.interactions:", the iteration is done over only real
interactions.
so try "print len([i for i in O.interaction])" and it should give you
correct results
cheers
Jan
2015-02-10 20:46 GMT+01:00 behzad <question261928@xxxxxxxxxxxxxxxxxxxxx>:
> New question #261928 on Yade:
> https://answers.launchpad.net/yade/+question/261928
>
> Hi,
>
> I'm running a simulations in which when I ask for number of interactions,
> I get 25612! But, I cannot find any of them and actually the geometry is
> not showing any interactions.
>
> Yade [31]: len(O.interactions)
> -> [31]: 25612
>
>
> list=[]
>
> Yade [28]: for x in range(len(O.bodies)):
> ....: if (O.bodies[x]):
> ....: if len(O.bodies[x].intrs())>0:
> ....: list.append(x)
> ....:
> Yade [30]: print(len(list))
> 0
>
>
>
> How this is possible?
>
> 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@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.