← Back to team overview

yade-users team mailing list archive

Re: Updating Engines in Python

 

Hello,




then i later want to update the gravity during the simulation, for example
gravity=(0,0,-9810)

How should I do that?
I guess it should be possible if you affect your GravityEngine to a variable (GE for example) : either from the beginning, or either by picking it at one time thanks to his name

GE = o.labeledEngine('GravityEngine') (check the name of the class maybe in YADE_CLASS_BASE... of the .hpp)

Then you should have the possibility to modifiy easily the value of one of his attribute, with :

   GE['gravity"]=...

Jerome

--
Jérôme Duriez
ATER Iut 1 Grenoble, département GMP - Laboratoire 3S-R
04.56.52.86.49 (ne pas laisser de messages sur le répondeur)


Follow ups

References