← Back to team overview

yade-users team mailing list archive

Re: ids bodies contact

 


1) case

box -> id=0
sphere -> id=1

Interaction:
id1=0 (box)
id2=1 (sphere)

2) case (I switch ids, alias I change the sequence in which I append the two bodies)

sphere -> id=0
box -> id=1

Interaction:
id1=1 (box) ---> why it is not id=0 as in the first case?
id2=0 (sphere)

My question is: how are assigned the ids of the contact once the interaction is created?

Wow, you have such bright questions :-)

It really depends on the order in which the collider creates the interaction in the first place. Then, asymmetric geometry functors might ask to swap the ids (e.g. Ig2_Box_Sphere_ScGeom will always change the interaction so that Box is id1 and Sphere is id2) so that they are in the order they accept (this happens in InteractionDispatchers loop).

If you look for interaction, the order of ids is irrelevant, O.interactions[i,j]==O.interactions[j,i] should be always true.

Cheers, Vaclav



Follow ups

References