1 from paraview.simple import *
2 from vtk.util import numpy_support
7 raise RuntimeError("Oooops : Assertion failed !")
8 NB_OF_LINES_FOR_1TS = 65 # not 66 because AB is not for inst == 2.0 !?
9 cr = ContactReader(registrationName='TEST.rco', FileName='23711_without_time.rco')
10 cr.UpdatePipelineInformation()
11 anim = GetAnimationScene()
13 times = tk.TimestepValues
17 ds0 = servermanager.Fetch(cr)
18 MyAssert([ds0.GetPointData().GetArrayName(i) for i in range(ds0.GetPointData().GetNumberOfArrays())]==["Resultante"])
19 MyAssert(ds0.GetNumberOfPoints()%NB_OF_LINES_FOR_1TS == 0)
20 step = int(ds0.GetNumberOfPoints()/NB_OF_LINES_FOR_1TS)
21 ts0 = numpy_support.vtk_to_numpy(ds0.GetPointData().GetAbstractArray(0))[::step]
22 MyAssert(ts0.shape == (NB_OF_LINES_FOR_1TS,3))