yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #18329
Re: [Question #675256]: running .so file wrapped by cython parallellized by mpi in yade
Question #675256 on Yade changed:
https://answers.launchpad.net/yade/+question/675256
Status: Open => Answered
Bruno Chareyre proposed the following answer:
To somehow reproduce the same namespace you need "from yadeimport import
*", where "yadeimport" is a symlink to yade executable.
For instance:
$ cd ~/yade/bin
$ ln -s yade-version yadeimport.py
$ ipython
In [1]: from yadeimport import *
In [2]: s=sphere((0,0,0),1)
In [3]: print s
<Body instance at 0x20fd400>
In [4]: O.engines
Out[4]:
[<ForceResetter instance at 0x137b790>,
<InsertionSortCollider instance at 0x177f710>,
<InteractionLoop instance at 0x18a3970>,
<GlobalStiffnessTimeStepper instance at 0x1908fd0>,
<NewtonIntegrator instance at 0x1658e30>]
You can of course import more selectively, e.g. "from yadeimport import
sphere".
HTH
Bruno
--
You received this question notification because your team yade-users is
an answer contact for Yade.