New question #706998 on Yade: https://answers.launchpad.net/yade/+question/706998
Hello all, I'm learning how to record a vtk file according to the tutorial example "05-3d-postprocessing.py". However, it seems that VTKRecorder command is not working, and the following error occurs: In [1]: python3.8: /build/vtk6-9ueea8/vtk6-6.3.0+dfsg2/IO/XML/vtkXMLOffsetsManager.h:142: void OffsetsManagerGroup::Allocate(int, int): Assertion `numElements > 0' failed. Aborted (core dumped) If i remove the VTKRecorder, the script runs well. I have noticed that a similar question appeared but it does not have a solution. https://answers.launchpad.net/yade/+question/690820 My Yade version: Yade 2022-12-14.git-7c728c4 (Installed by source code) My Ubuntu version: Ubuntu 20.04.6 LTS Best Yipeng Here is the script: https://gitlab.com/yade-dev/trunk/blob/master/doc/sphinx/tutorial/05-3d-postprocessing.py # demonstrate 3d postprocessing with yade # # 1. qt.SnapshotEngine saves images of the 3d view as it appears on the screen periodically # makeVideo is then used to make real movie from those images # 2. VTKRecorder saves data in files which can be opened with Paraview # see the User's manual for an intro to Paraview # generate loose packing from yade import pack, qt sp=pack.SpherePack() sp.makeCloud((0,0,0),(2,2,2),rMean=.1,rRelFuzz=.6,periodic=True) # add to scene, make it periodic sp.toSimulation() O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), NewtonIntegrator(damping=.4), # save data for Paraview VTKRecorder(fileName='3d-vtk-',recorders=['all'],iterPeriod=1000), # save data from Yade's own 3d view qt.SnapshotEngine(fileBase='3d-',iterPeriod=200,label='snapshot'), # this engine will be called after 20000 steps, only once PyRunner(command='finish()',iterPeriod=20000) ] O.dt=.5*PWaveTimeStep() # prescribe constant-strain deformation of the cell O.cell.velGrad=Matrix3(-.1,0,0, 0,-.1,0, 0,0,-.1) # we must open the view explicitly (limitation of the qt.SnapshotEngine) qt.View() # this function is called when the simulation is finished def finish(): # snapshot is label of qt.SnapshotEngine # the 'snapshots' attribute contains list of all saved files makeVideo(snapshot.snapshots,'3d.mpeg',fps=10,bps=10000) O.pause() # set parameters of the renderer, to show network chains rather than particles # these settings are accessible from the Controller window, on the second tab ("Display") as well rr=yade.qt.Renderer() rr.shape=False rr.intrPhys=True -- You received this question notification because your team yade-users is an answer contact for Yade. _______________________________________________ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp