Unable to read the VTKrecorder continuously
Hi,
I have encountered the following error message: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).
I intend to initiate the VTKrecorder at three specific time points(shallow, medium, and deep), continuously read data over several specific time intervals following each particular time point, and close the VTKrecorder upon completion of data reading.
I believe the logic underlying these three VTKrecorders should be identical. Oddly, the first VTKrecorder operates as expected, delivering the required data, but the second VTKrecorder occasionally malfunctions. Sometimes, the second VTKrecorder works correctly, yet the third fails. The error always occurs when the VTKrecorder records the 3D-VTK-intr, and there will be an additional file with a similar file name but ends with _0.
I use the following example to reproduce this issue.
Thank you for your help
from yade import pack
O.bodies.append(geom.facetBox((.5, .5, .5), (.5, .5, .5), wallMask=31))
sp = pack.SpherePack()
sp.makeCloud((0, 0, 0), (1, 1, 1), rMean=.05, rRelFuzz=.5)
sp.toSimulation()
O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]),
InteractionLoop(
# handle sphere+sphere and facet+sphere collisions
[Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.4),
PyRunner(virtPeriod=0.5,command="start_vtk_shallow()",label="start_at_virt_shallow"),#start to record vtk at O.time =0.5
PyRunner(virtPeriod=1,command="start_vtk_medium()",label="start_at_virt_medium"),#
PyRunner(virtPeriod=3,command="start_vtk_deep()",label="start_at_virt_deep"),#
VTKRecorder(dead=True,fileName='3d-vtk-shallow',recorders=['all','bstresses'],virtPeriod=0.01,nDo=3,label="vtkrecord_shallow"),# start at O.time =0.5 ,every 0.01 for 3 times
VTKRecorder(dead=True,fileName='3d-vtk-medium',recorders=['all','bstresses'],virtPeriod=0.01,nDo=3,label="vtkrecord_medium"),#
VTKRecorder(dead=True,fileName='3d-vtk-deep',recorders=['all','bstresses'],virtPeriod=0.01,nDo=3,label="vtkrecord_deep"),#
]
def start_vtk_shallow():
start_at_virt_shallow.dead = True
vtkrecord_shallow.dead = False
def start_vtk_medium():
start_at_virt_medium.dead = True
vtkrecord_medium.dead = False
def start_vtk_deep():
start_at_virt_deep.dead = True
vtkrecord_deep.dead = False
O.dt = 3.6e-5
Best,
Mikexue