New question #685305 on Yade:
https://answers.launchpad.net/yade/+question/685305

Hello,

I'm having trouble resetting to zero some of O.cell.velGrad coefficients in a 
periodic cell. I assign new values through O.cell.nextVelGrad as yade's 
documention specifies it, but when the value I want to assign is zero velGrad 
doesn't change. 
Besides O.cell.velGradChanged always stays False. If I understood the 
documentation correctly it should be turned to True as soon as I set a value in 
O.cell.nextVelGrad.

Is there something I'm missing? 

Thanks in advance, 

I'm using Yade 2018.02b, here is my MWE and output:

O.periodic = True
O.bodies.append(sphere((1,1,1),1))
O.cell.setBox(2,2,2)

print O.cell.velGrad, O.cell.velGradChanged

for i in range(3): O.cell.nextVelGrad[i,i] = -1 
O.step()
print O.cell.velGrad, O.cell.velGradChanged

for i in range(3): O.cell.nextVelGrad[i,i] = -2
O.step()
print O.cell.velGrad, O.cell.velGradChanged
          
for i in range(3): O.cell.nextVelGrad[i,i] = 0
O.step()
print O.cell.velGrad, O.cell.velGradChanged

############

Output: 

Matrix3(0,0,0, 0,0,0, 0,0,0) False
Matrix3(-1,0,0, 0,-1,0, 0,0,-1) False
Matrix3(-2,0,0, 0,-2,0, 0,0,-2) False
Matrix3(-2,0,0, 0,-2,0, 0,0,-2) False



-- 
You received this question notification because your team yade-users 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