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

Jan Stránský proposed the following answer:
> I finished running my program because it printed 'finished'.Is it
'compression before saving'?

No, before saving there is no compression.. Just read the script as a
computer would do..

> sigmaIso=-1e5
>
> from yade import pack, qt, plot
>
> O.periodic=True
> sp=pack.SpherePack()
> sp.makeCloud((0,0,0),(2,2,2),rMean=.1,rRelFuzz=.3,periodic=True)
> sp.toSimulation()

creates "the initial, uncompressed cloud"

> O.engines=[
>  ForceResetter(),
> InsertionSortCollider([Bo1_Sphere_Aabb()]),
>  InteractionLoop(
>   [Ig2_Sphere_Sphere_ScGeom()],
>   [Ip2_FrictMat_FrictMat_FrictPhys()],
>   [Law2_ScGeom_FrictPhys_CundallStrack()]
>  ),
>  PeriTriaxController(label='triax', 
> goal=(sigmaIso,sigmaIso,sigmaIso),stressMask=7, 
> dynCell=True,maxStrainRate=(10,10,10), maxUnbalanced=.1,relStressTol=1e-3, 
> doneHook='triaxFinished()'
 ),
>  NewtonIntegrator(damping=.2),
>  PyRunner(command='addPlotData()',iterPeriod=100),
> ]

define O.engines

> O.dt=.5*PWaveTimeStep()

define O.dt

> def triaxFinished():
>  print 'Finished'
>  O.pause()

define a function

> O.save('a.yade.bz2')
> O.saveTmp()

so until now there is just creation of "the initial, uncompressed cloud" and 
definitions, no compression..
Yade saves the state, prior any compression, in fact prior anything, just 
saving "the initial, uncompressed cloud"..

Probably you want something like O.run(...) or something like that before 
saving..
In this case, note that just O.run() jumps to O.save directly, so it should be 
O.run(...,True) or O.run(); O.wait() or putting the save in PyRunner with 
sufficient condition, or ...........

Jan

-- 
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