← Back to team overview

yade-users team mailing list archive

[Question #667119]: how to specifically find interraction number of spheres to a body

 

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

Good morning,
I have a list that contains the id's of all the particles in my simulation.
What i wanted to do was return a list of id's whose corresponding particle comes in contact with more than 4(5,6,7,.....) particles
Up until now i ve been using this
def findconnectivity(x):

	return len(O.interactions.withBody(x))





def connectivityIndex(connectivity):

	global conIndex

	conIndex[:]=[]

	for x in loc2glob[:]:

		if len(O.interactions.withBody(x))>connectivity:

			conIndex.append(x)

	return conIndex



def connectivity():

	getHighCon=[]

	for x in conIndex[:]:

		getHighCon.append([O.bodies[x].state.pos[0],O.bodies[x].state.pos[1],O.bodies[x].state.pos[2]])

	return getHighCon



where loc2glob is the index containing the spheres. 
However this propably counts interractions with facets as well.
Is there a way to exclude those in the count?
Any help is much appreciated
Thanks
Best regards
John

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