← Back to team overview

yade-users team mailing list archive

Re: [Question #182459]: wrap a simulation to a class

 

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

    Status: Open => Answered

Chiara Modenese proposed the following answer:
On 20 December 2011 12:15, ceguo
<question182459@xxxxxxxxxxxxxxxxxxxxx>wrote:

> New question #182459 on Yade:
> https://answers.launchpad.net/yade/+question/182459
>
> Hi,
>
> I want to write a class, the __init__() function of which is the set up of
> a packing, and some other method functions of which include
> isoConsolidation(), applyStrain(), getStress(), etc. So with this class, I
> can run a simulation (triaxial, simple shear or any other kind) by directly
> calling this class and its method functions. Because I want to run several
> simulations simultaneously within another python code.
>
> First I want to know how to execute a yade file using `python filename`
> with appropriate libraries imported rather than using `yade filename`?

Maybe you can try to use the following function:
execfile('fileName.py')

> After knowing this, I think I can find out how to write such a wrapped
> class.
>
> Best regards,
> Ning
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.