← Back to team overview

yade-users team mailing list archive

[Question #670793]: Usage of "InteractionContainer.countReal"

 

New question #670793 on Yade:
https://answers.launchpad.net/yade/+question/670793

Hello,everyone!
     I am trying to find out the number of particles interacting (the number of interactions per particle). I saw the "countreal" function in the tutorial, but it does not use this function. Below is my program, thanks!
def myFunction():
    f=open('/home/ma/jiaohu/jiaohu.txt','a')
    for b in O.bodies:
      if b.id>5:
        f.write("Body {}\b".format(b.id))
        f.write("r={}\b".format(b.shape.radius)
        for i in b.interactions:
           f.write("n={}\n".format(i.countreal))

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