yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #20925
Re: [Question #684747]: can we do tesselation at another code
Question #684747 on Yade changed:
https://answers.launchpad.net/yade/+question/684747
Jan Stránský proposed the following answer:
Hello,
concerning the error, just delete the line (the wrong character,
possibly some invisible symbol, should be deleted) and manually write
TW.triangulate()
concerning saving data without tesselation and do the tesselation
externally, here is a MWE for yade:
### code running on cluster without TesselationWrapper
from yade import export
O.bodies.append(sphere((1,1,1),.5))
O.bodies.append([sphere((x,y,z),.5) for x in (0,2) for y in (0,2) for z in (0,2)])
export.text("state0.txt")
O.bodies[0].state.vel = (1,0,0)
O.run(100,True)
export.text("state1.txt")
###
### code running as post-processing with TesselationWrapper
from yade import ymport
O.bodies.append(ymport.text("state0.txt"))
TW=TesselationWrapper()
TW.triangulate()
TW.computeVolumes()
TW.setState(0)
#
O.reset()
O.bodies.append(ymport.text("state1.txt"))
TW.setState(1)
#
TW.defToVtk("strain.vtk")
###
I expect there are other softwares to do this (e.g., I would be
surprised if it was not possible in Paraview).
cheers
Jan
--
You received this question notification because your team yade-users is
an answer contact for Yade.