yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #19873
Re: [Question #681223]: change mat paras
Question #681223 on Yade changed:
https://answers.launchpad.net/yade/+question/681223
Status: Open => Answered
Jérôme Duriez proposed the following answer:
Hi,
What about some testing ?
O.bodies.append(sphere((0,0,0),1))
O.bodies.append(sphere((0,0,2),1))
O.bodies[1].mat.dict() # shows an initial value of 1.e7 for O.bodies[1].mat.young
O.bodies[0].mat.young = 2.e8
O.bodies[1].mat.dict() # confirms 1.e7 has been changed to 2e8
See https://yade-dem.org/doc/prog.html#returning-attribute-by-value-or-
by-reference for more background infos.
Note that I'm speaking here only about changing Material themselves, not
interaction parameters. Follow Jan's #2 philosophy if this is actually
your goal.
(Maybe you were somewhat confused saying "If changing the mat of a
sphere won't influence the mat in O.materials" : changing Material
objects does change Material objects, the problem is "just" that
interaction properties are not continuously computed from Material
objects)
--
You received this question notification because your team yade-users is
an answer contact for Yade.