yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #05686
Re: [Question #190529]: deleting some liquid bridges in Law2_ScGeom_CapillaryPhys_Capillarity
Question #190529 on Yade changed:
https://answers.launchpad.net/yade/+question/190529
Christian Jakob posted a new comment:
What is the best way to make a loop over all interactions, i tried this,
#determine contacts that are below water_height
for xx in sphID:
x = O.bodies[xx]
if ((x) and (isinstance(x.shape,Sphere))):
for yy in sphID:
y = O.bodies[yy]
if ((y) and (isinstance(y.shape,Sphere))):
if ((xx != yy) and (O.interactions[xx,yy].isReal)):
i=O.interactions[xx,yy]
z_int=i.geom.pos[2] #z coordinate of interaction
if z_int < water_height:
print z_int
but i get
File "5-final.py", line 61, in <module>
if ((xx != yy) and (O.interactions[xx,yy].isReal)):
IndexError: No such interaction
--
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.