From b14e15123bafc2d6a44649387c7d6f07685bf744 Mon Sep 17 00:00:00 2001 From: vtn Date: Wed, 19 Mar 2014 20:08:50 +0400 Subject: [PATCH] Fixed GaussPointsOnField1 --- src/PV_SWIG/VTKWrapping/presentations.py | 9 +++++++++ test/VisuPrs/GaussPoints/C9.py | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/PV_SWIG/VTKWrapping/presentations.py b/src/PV_SWIG/VTKWrapping/presentations.py index 8f4a57f4..7c62380a 100644 --- a/src/PV_SWIG/VTKWrapping/presentations.py +++ b/src/PV_SWIG/VTKWrapping/presentations.py @@ -2174,6 +2174,15 @@ def GaussPointsOnField1(proxy, entity, field_name, # Get time value time_value = get_time(proxy, timestamp_nb) + # Select field_name + fields_info = proxy.GetProperty("FieldsTreeInfo")[::2] + arr_name_with_dis=[elt.split("/")[-1] for elt in fields_info] + gauss_name=field_name+proxy.GetProperty("Separator").GetData()+'GAUSS' + if arr_name_with_dis.count(gauss_name) > 0: + index = arr_name_with_dis.index(gauss_name) + field = fields_info[index] + proxy.AllArrays = [field] + # Set timestamp pvs.GetRenderView().ViewTime = time_value proxy.UpdatePipeline(time=time_value) diff --git a/test/VisuPrs/GaussPoints/C9.py b/test/VisuPrs/GaussPoints/C9.py index 3f602a39..0426b9a4 100644 --- a/test/VisuPrs/GaussPoints/C9.py +++ b/test/VisuPrs/GaussPoints/C9.py @@ -30,13 +30,13 @@ import pvsimple # Directory for saving snapshots -picturedir = get_picture_dir(sys.argv[1], "GaussPoints/C9") +picturedir = get_picture_dir("GaussPoints/C9") if not picturedir.endswith(os.sep): picturedir += os.sep # MED file file_name = datadir + "petit.rmed" -field_name = "RESPIL_SIEF_ELGA" +field_name = "RESPIL__SIEF_ELGA" timestamp_nb = -1 # last timestamp paravis.myParavis.ImportFile(file_name) -- 2.39.2