yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #27762
[Question #701803]: Use of O.Step and O.Pause when saving Packing
New question #701803 on Yade:
https://answers.launchpad.net/yade/+question/701803
Hi,
I think I did not get how O.Step and O.Pause are supposed to work.
In a basic triaxial testing script, I am using the following function to save the packing. Before doing that , I would like to change some properties of the material or as in the example, the spheres radii:
def DoneHook():
O.interactions.clear()
O.cell.velGrad=Matrix3(0,0,0,0,0,0,0,0,0)
O.cell.trsf=Matrix3.Identity
ac = O.cell.hSize
np.save(fname + '.cellSizeCloud',ac)
O.interactions.clear()
#O.pause() #DO I NEED TO PAUSE BEFORE SAVING?
#CHANGING MATERIAL OR GEOMETRICK PROPERTIES
for b in O.bodies:
b.shape.radius = R
#O.step() #DO I NEED IT TO APPLY THE CHANGES?
for b in O.bodies:
b.state.pos = O.cell.wrap(b.state.pos)
export.text(fname+".packing")
O.pause()
When I used O.pause() before exporting, I have a random occurrence of Python Fatal Error *status is not current* and the file is not exported or exported with errors.
As you can read from my questions in the script's comments, I am unsure of the use of O.pause. Without it, I am able to save the file correctly but I do not know why.
Please let me know if you need a minimal working script to test this behaviour
thank you
--
You received this question notification because your team yade-users is
an answer contact for Yade.