Question #240275 on Yade changed:
https://answers.launchpad.net/yade/+question/240275

Bruno Chareyre proposed the following answer:
>if explained by yade code, it is like
>O.bodies[1].groupMask=[1,2]

Jerome's suggestion is:
> O.bodies[1].groupMask=3 

Which is indeed the correct translation of [1,2] (Algodoo) into a
bitmask (Yade). It seems to me that any combination that you can define
in the Algodoo way  can similarly be reproduced with bitmasks.

Note that there is  no absolute need to use avoidSelfInteractionMask if you 
stick to four particles only.
This should be ok:
mask0 = 11 (0 interacts with 1 and 3 => 1+2+8=11)
mask1 = 7 (1 interacts with 0 and 2 => 2+1+4=7)
mask2 = 14 (etc.)
mask3 = 13

Since this technique can be painfull to generalize to N particles, the
purpose of avoidSelfInteractionMask was to make some logical operations
easier in the general case.

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to