← 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

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.