yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #22755
Re: [Question #689919]: Accumulation effect of heat over time steps
Question #689919 on Yade changed:
https://answers.launchpad.net/yade/+question/689919
Status: Open => Answered
Jan Stránský proposed the following answer:
Thanks for more details
> self.cumulativeData = dict((a,0) for a in range(2,10))
here you tell that you only want to store bodies with ids in
range(2,10)...
> vtk.exportSpheres(...)
... but exportSpheres exports all spheres by default, resulting in the
error
You can (depending on your needs):
a) limit the export to the range:
vtk.exportSpheres(ids=list(range(2,10)),...)
b) return some artificial value for not-stored bodies:
class SomeCalculator:
...
def getCurrent(self,b): # the same modification for getCumulative
return self.currentData.get(b.id,0) # 0 is the "default" value for not-stored bodies, can be anything else
cheers
Jan
--
You received this question notification because your team yade-users is
an answer contact for Yade.