← Back to team overview

yade-users team mailing list archive

Re: [Question #685055]: can we set a mask for a particular particle

 

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

    Status: Answered => Open

nobody is still having a problem:
Hi Jan,

1)  you mean mask = 1 is the default value, I'm a little bit confused.
Because in [1] the mask = 1, in [2] , mask = -1.


if mask = 1 is the default value. 

so for this command:  A sphere is exported if: (mask<0) or ((mask &
b.mask) > 0)

mask < 0 is false.

& is the bitwise operation.

here is the definition of bitwise.
x & y
Does a "bitwise and". Each bit of the output is 1 if the corresponding bit of x AND of y is 1, otherwise, it's 0.

the binary expression for 1 is  00000001, if we want the output to be 1,
the only choice is to set b.mask is also  00000001. so I need to set b.mask = 1???
Is my understanding right?  


best,
yong


References:
[1] https://yade-dem.org/doc/yade.utils.html?highlight=yade%20utils%20sphere#yade.utils.sphere
[2] https://yade-dem.org/doc/yade.export.html?highlight=export%20text#yade.export.text

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