From 83fa2fe12ba8c03691f1f68a3c5097e8f11d85e0 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Thu, 24 Jun 2021 10:05:20 +0200 Subject: [PATCH] [EDF23711] : Activate test with time --- src/ContactReader/Test/23711_with_time.py | 17 +++-------------- .../Test/CTestTestfileInstall.cmake | 2 +- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/src/ContactReader/Test/23711_with_time.py b/src/ContactReader/Test/23711_with_time.py index 31aa739..8e72ee7 100644 --- a/src/ContactReader/Test/23711_with_time.py +++ b/src/ContactReader/Test/23711_with_time.py @@ -12,13 +12,8 @@ anim = GetAnimationScene() tk = anim.TimeKeeper times = tk.TimestepValues MyAssert(times==[0.0,1.0,2.0]) -Show(cr) -meshViewer = GetActiveView() # time step 0 -meshViewer.ViewTime = times[0] -meshViewer.Representations[0].UpdatePipeline() -Render() -cr.UpdatePipeline() +cr.UpdatePipeline(time = times[0]) ds0 = servermanager.Fetch(cr) MyAssert([ds0.GetPointData().GetArrayName(i) for i in range(ds0.GetPointData().GetNumberOfArrays())]==["Resultante"]) MyAssert(ds0.GetNumberOfPoints()%NB_OF_LINES_FOR_1TS == 0) @@ -27,20 +22,14 @@ ts0 = numpy_support.vtk_to_numpy(ds0.GetPointData().GetAbstractArray(0))[::step] MyAssert(ts0.shape == (NB_OF_LINES_FOR_1TS,3)) # time step 1 -meshViewer.ViewTime = times[1] -meshViewer.Representations[0].UpdatePipeline() -Render() -cr.UpdatePipeline() +cr.UpdatePipeline(time = times[1]) ds0 = servermanager.Fetch(cr) ts1 = numpy_support.vtk_to_numpy(ds0.GetPointData().GetAbstractArray(0))[::step] MyAssert(not np.all(ts0==ts1)) MyAssert(ts1.shape == (NB_OF_LINES_FOR_1TS,3)) # time step 2 -meshViewer.ViewTime = times[2] -meshViewer.Representations[0].UpdatePipeline() -Render() -cr.UpdatePipeline() +cr.UpdatePipeline(time = times[2]) ds0 = servermanager.Fetch(cr) ts2 = numpy_support.vtk_to_numpy(ds0.GetPointData().GetAbstractArray(0))[::step] MyAssert(ts2.shape == (NB_OF_LINES_FOR_1TS-1,3)) # ???? for TS == 2.0 Plot AS is missing !? diff --git a/src/ContactReader/Test/CTestTestfileInstall.cmake b/src/ContactReader/Test/CTestTestfileInstall.cmake index a39ba53..9759cda 100644 --- a/src/ContactReader/Test/CTestTestfileInstall.cmake +++ b/src/ContactReader/Test/CTestTestfileInstall.cmake @@ -18,7 +18,7 @@ # SET(TEST_NAMES -#23711_with_time +23711_with_time 23711_without_time ) -- 2.39.2