← 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

Jan Stránský proposed the following answer:
Definitely Bruno's answer is good. Also try
utils.bodyStressTensors()
Jan
Dne 22.10.2012 18:01 "Chareyre" <question211968@xxxxxxxxxxxxxxxxxxxxx>
napsal(a):

> Question #211968 on Yade changed:
> https://answers.launchpad.net/yade/+question/211968
>
>     Status: Open => Answered
>
> Chareyre proposed the following answer:
> Not sure it will work, but try:
> s=bodyStressTensors()
> vtkExporter.exportSpheres(what=[...,('particleStress','s[b.id]')])
>
> Also note that bodyStressTensors() is doing a lot of computation, so it
> is not appropriate to use it in your context, or to write something
> like:
>
> for b in bodies:
>    bodyStressTensors()[b.id]
>
> since it would recompute everything at each step in the loop. Better
> compute it once and use the returned list, as suggested above.
>
> --
> 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.