← Back to team overview

yade-users team mailing list archive

Re: [Question #211968]: fabric tensor calc and exportSpheres

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
One solution could be:

__bultins__.s = s

and then your code (to prevent some name problems, chose different name
than "s" :-)

Jan


2012/10/23 ceguo <question211968@xxxxxxxxxxxxxxxxxxxxx>

> Question #211968 on Yade changed:
> https://answers.launchpad.net/yade/+question/211968
>
>     Status: Answered => Open
>
> ceguo is still having a problem:
> Hi Bruno,
>
> I'm using version bzr3149, quite a new one. Also when I use your method,
> it reports:
>
> File "HOMEDIR/yade/lib/yade-trunk/py/yade/export.py", line 237, in
> exportSpheres
>     test = eval(command)
>   File "<string>", line 1, in <module>
> NameError: name 's' is not defined
>
> My code is:
> vtkExporter = export.VTKExporter('particleInfo')
> s=bodyStressTensors()
>
> vtkExporter.exportSpheres(what=[('particleVelocity','b.state.vel'),('particleDisplacement','b.state.displ()'),('particleStress','s[
> b.id]')])
>
> --
> 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.