← Back to team overview

yade-users team mailing list archive

Re: [Question #244203]: How to read data from external file

 

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

jduriez proposed the following answer:
Hi,

For reading a file from Yade, give a look to the python code of
ymport.textExt() function, in
https://github.com/yade/trunk/blob/master/py/ymport.py from line 13.

The reverse operation (writing in a file data concerning your force)
will be easy if you look to export.textExt() in
https://github.com/yade/trunk/blob/master/py/export.py, from line 10

But, if you do not quit your yade session, you can indeed use a python
variable, that you set / use when needed.

But probably there is a 3rd method, more straightforward, to keep these forces acting on your bodies : give a look to https://www.yade-dem.org/doc/yade.wrapper.html#yade.wrapper.ForceContainer.permF 
(I never used it, so I can not tell you more at the moment)

I guess you will succeed !

Jérôme

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