> Basically, you do bitwise addition of what you components where you want > stress-control, taking > > x: 000001 > y: 000010 > z: 000100 > > So for x+z you get 1+4=5. (100 in binary is 4 decimal). You can also > write it using 0,1,2 indices for x,y,z and using bitshift operator: > > (1<<0)+(1<<2)=5 (try it in python). > > Finally, python lets you write binary directly with the 0b prefix: > > 0b001+0b100 > 5 > Ok, so for instance stressMask=7 should give me the stress control in all three directions, is it? Sorry, I am not used to bitwise operations. Chiara
> > _______________________________________________ > Mailing list: > https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users> > Post to : [email protected] > Unsubscribe : > https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users> > More help : https://help.launchpad.net/ListHelp >
_______________________________________________ Mailing list: https://launchpad.net/~yade-users Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp

