← Back to team overview

yade-users team mailing list archive

Re: [Question #701438]: Why particle velocity varies with time step

 

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

Jan Stránský posted a new comment:
@Karol: I was surprised, too, but it does works also this way :-D
It seems that somehow using class directly passes the argument to some instances.
Maybe something about how boost.python and YADE macros deals with it?
Anyway, I would not call it the best practice..

### MWE
newton1 = NewtonIntegrator()
print("1",newton1.damping) # 0.2
newton1.damping = 0.3
print("1",newton1.damping) # 0.3
NewtonIntegrator.damping = 0.4
print("1",newton1.damping) # 0.4 (!)
newton2 = NewtonIntegrator
print("1",newton1.damping) # 0.4
print("2",newton2.damping) # 0.4
NewtonIntegrator.damping = 0.5
print("1",newton1.damping) # 0.5 (!)
print("2",newton2.damping) # 0.5 (!)
newton1.damping = 0.6
newton2.damping = 0.7
print("1",newton1.damping) # 0.6
print("2",newton2.damping) # 0.7
NewtonIntegrator.damping = 0.8
print("1",newton1.damping) # 0.6 (!)
print("2",newton2.damping) # 0.8 (!)
###

Cheers
Jan

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