← Back to team overview

yade-users team mailing list archive

Re: [Question #665314]: save/load precedure

 

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

    Status: Open => Answered

Bruno Chareyre proposed the following answer:
>what parameters are supposed to be saved in every save/load procedure?

The content of "O" (bodies, engines, interactions).

>and what parameters show be defined again in new script??

Everything else.

You can escape the problem by not using two different scripts, and still avoid re-running the first part.
Start the script with:

if (saved):
     reload()
else:
    #create packing

All function definitions and parameters should be outside this if-else,
of course, so they are re-defined consistently every time.

I hope it helps

Bruno

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