Question #699565 on Yade changed: https://answers.launchpad.net/yade/+question/699565
Status: Open => Answered Karol Brzezinski proposed the following answer: Hi Zheng, I am not sure whether I understand you correctly. From what I understood, you want to know how many contacts of each particle have a normal force (amplitude) bigger than the threshold (mean force that you computed). I propose a modification of your last loop like this: bodyId_numOfContacts = [] for b in O.bodies: counter = 0 for ii in b.intrs(): if ii.phys.normalForce.norm() > avgForce: counter += 1 bodyId_numOfContacts.append([b.id, counter]) bodyId_numOfContacts = np.array(bodyId_numOfContacts) Cheers, Karol -- You received this question notification because your team yade-users 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