linewidths = [1.0, 3.0, 10.0]
compare_prec = 0.00001
-field_name = 'vectoriel_field'
+field_name = 'vectoriel field'
print "\nCreating Vectors.......",
vectors = VectorsOnField(proxy, EntityType.CELL, field_name, 1,
linewidths = [1.0, 3.0, 10.0]
compare_prec = 0.00001
-field_name = 'vectoriel_field'
+field_name = 'vectoriel field'
print "\nCreating stream_lines......."
stream_lines = StreamLinesOnField(proxy, EntityType.CELL,
linewidths = [1.0, 3.0, 10.0]
compare_prec = 0.00001
-field_name = 'scalar_field'
+field_name = 'scalar field'
print "\nCreating cut planes.......",
cut_planes = CutPlanesOnField(proxy, EntityType.CELL, field_name, 1,
linewidths = [1.0, 3.0, 10.0]
compare_prec = 0.00001
-field_name = 'scalar_field'
+field_name = 'scalar field'
print "\nCreating cut lines.......",
cut_lines = CutLinesOnField(proxy, EntityType.CELL, field_name, 1,
print "Creating Deformed Shape...............",
cell_entity = EntityType.CELL
-field_name = 'vectoriel_field'
+field_name = 'vectoriel field'
defshape = DeformedShapeOnField(med_reader, cell_entity, field_name, 1)
pvsimple.ResetCamera()
print "Creating Deformed Shape...............",
cell_entity = EntityType.CELL
-field_name = 'vectoriel_field'
+field_name = 'vectoriel field'
defshape = DeformedShapeOnField(med_reader, cell_entity, field_name, 1)
pvsimple.ResetCamera()
print "**** Stage4: Displaying scalar field"
print "Creating Scalar Map.......",
-scalarmap1 = ScalarMapOnField(med_reader1, cell_entity, 'scalar_field', 1)
+scalarmap1 = ScalarMapOnField(med_reader1, cell_entity, 'scalar field', 1)
if scalarmap1 is None:
print "FAILED"
else:
view.ResetCamera()
print "Creating Iso Surfaces.....",
-isosurfaces1 = IsoSurfacesOnField(med_reader1, cell_entity, 'scalar_field', 1)
+isosurfaces1 = IsoSurfacesOnField(med_reader1, cell_entity, 'scalar field', 1)
if isosurfaces1 is None:
print "FAILED"
else:
print "OK"
print "Creating Cut Planes.......",
-cutplanes1 = CutPlanesOnField(med_reader1, cell_entity, 'scalar_field', 1,
+cutplanes1 = CutPlanesOnField(med_reader1, cell_entity, 'scalar field', 1,
orientation=Orientation.YZ)
if cutplanes1 is None:
print "FAILED"
print "Creating Scalar Map On Deformed Shape.......",
scalarmapondefshape1 = DeformedShapeAndScalarMapOnField(med_reader1,
cell_entity,
- 'vectoriel_field', 1)
+ 'vectoriel field', 1)
if scalarmapondefshape1 is None:
print "FAILED"
else:
# 2. Creation of GaussPoints presentations
mesh_name = "Maillage"
-field_name = "Result_EQUI_ELGA_SIGM"
+field_name = "Result__EQUI_ELGA_SIGM__________"
timestamp_list = range(1, 5)
for timestamp in timestamp_list:
sizes=[]
for i in range(1,11):
- presentation = DeformedShapeAndScalarMapOnField(med_reader1, EntityType.NODE, "MODES_DEPL", i)
+ presentation = DeformedShapeAndScalarMapOnField(med_reader1, EntityType.NODE, "MODES___DEPL____________________", i)
if presentation is None :
raise RuntimeError, "Presentation is None!!!"
sizes=[]
for i in range(1,11):
- presentation = DeformedShapeAndScalarMapOnField(med_reader2, EntityType.NODE, "MODES_DEPL", 11-i)
+ presentation = DeformedShapeAndScalarMapOnField(med_reader2, EntityType.NODE, "MODES___DEPL____________________", 11-i)
if presentation is None :
raise RuntimeError, "Presentation is None!!!"
view = pvsimple.GetRenderView()
# Creation of colored "DeformedShape" presentations, based on time stamps of "RESU_DEPL" field
-presentation = DeformedShapeOnField(med_reader, EntityType.NODE, 'RESU_DEPL', 1, is_colored=True)
+presentation = DeformedShapeOnField(med_reader, EntityType.NODE, 'RESU____DEPL____________________', 1, is_colored=True)
if presentation is None :
raise RuntimeError, "DeformedShapeOnField Presentation is None!!!"
reset_view(view)
# Creation of colored "Vectors" presentations, based on time stamps of "RESU_DEPL" field
-presentation = VectorsOnField(med_reader, EntityType.NODE, 'RESU_DEPL', 1, is_colored=True)
+presentation = VectorsOnField(med_reader, EntityType.NODE, 'RESU____DEPL____________________', 1, is_colored=True)
if presentation is None :
raise RuntimeError, "Vectors Presentation is None!!!"
reset_view(view)
# Creation of colored "DeformedShapeAndScalarMap" presentations, based on time stamps of "RESU_DEPL" field
-presentation = DeformedShapeAndScalarMapOnField(med_reader, EntityType.NODE, 'RESU_DEPL', 1)
+presentation = DeformedShapeAndScalarMapOnField(med_reader, EntityType.NODE, 'RESU____DEPL____________________', 1)
if presentation is None :
raise RuntimeError, "DeformedShapeAndScalarMap Presentation is None!!!"
reset_view(view)
# Creation of colored "CutPlanes" presentations, based on time stamps of "RESU_DEPL" field
-presentation = CutPlanesOnField(med_reader, EntityType.NODE, 'RESU_DEPL', 1)
+presentation = CutPlanesOnField(med_reader, EntityType.NODE, 'RESU____DEPL____________________', 1)
if presentation is None :
raise RuntimeError, "CutPlanes Presentation is None!!!"
# 2. Displaying scalar field
print "Creating Scalar Map.......",
-scalarmap = ScalarMapOnField(med_reader, EntityType.CELL, 'scalar_field', 1)
+scalarmap = ScalarMapOnField(med_reader, EntityType.CELL, 'scalar field', 1)
if scalarmap is None:
print "FAILED"
else:
import pvsimple
my_paravis = paravis.myParavis
-os.environ["PARAVIS_TEST_PICS"] = sys.argv[1]
picturedir = get_picture_dir("imps/A1")
-
def set_prs_colored(prs, proxy, entity, field_name, vector_mode, timestamp_nb):
# Get time value
time_value = get_time(proxy, timestamp_nb)
# 2. Creation of "CutPlanes" presentation, based on time stamp of "scalar field" field
print 'Creation of "CutPlanes" presentation, based on time stamp of "scalar field" field....'
-cutplanes = CutPlanesOnField(med_reader, EntityType.CELL, "scalar_field", 1)
+cutplanes = CutPlanesOnField(med_reader, EntityType.CELL, "scalar field", 1)
if cutplanes is None :
raise RuntimeError, "Presentation is None!!!"
else:
print "Setting of deformation:"
warp_vector = pvsimple.WarpByVector(cutplanes.Input)
-warp_vector.Vectors = ["vectoriel_field"]
+warp_vector.Vectors = ["scalar field"]
warp_vector.ScaleFactor = 5.0
print "Got scale : ", warp_vector.ScaleFactor
print "Got field name: ", warp_vector.Vectors
presentation = pvsimple.GetRepresentation(warp_vector)
-set_prs_colored(presentation, med_reader, EntityType.CELL, "scalar_field", 'Magnitude', 1)
+set_prs_colored(presentation, med_reader, EntityType.CELL, "scalar field", 'Magnitude', 1)
pic_path = os.path.join(picturedir, "deformed_cut_planes_scalar" + "." + pictureext)
process_prs_for_test(presentation, view, pic_path)
# 3. Creation of "CutPlanes" presentation, based on time stamp of "vectoriel field" field
print 'Creation of "CutPlanes" presentation, based on time stamp of "vectoriel field" field....'
-cutplanes = CutPlanesOnField(med_reader, EntityType.CELL, "vectoriel_field", 1)
+cutplanes = CutPlanesOnField(med_reader, EntityType.CELL, "vectoriel field", 1)
if cutplanes is None :
raise RuntimeError, "Presentation is None!!!"
print "Setting of deformation:"
warp_vector = pvsimple.WarpByVector(cutplanes.Input)
-warp_vector.Vectors = ["vectoriel_field"]
+warp_vector.Vectors = ["vectoriel field"]
warp_vector.ScaleFactor = 5.0
print "Got scale : ", warp_vector.ScaleFactor
print "Got field name: ", warp_vector.Vectors
presentation = pvsimple.GetRepresentation(warp_vector)
-set_prs_colored(presentation, med_reader, EntityType.CELL, "vectoriel_field", 'Magnitude', 1)
+set_prs_colored(presentation, med_reader, EntityType.CELL, "vectoriel field", 'Magnitude', 1)
pic_path = os.path.join(picturedir, "deformed_cut_planes_vectorial" + "." + pictureext)
process_prs_for_test(presentation, view, pic_path)
print "**** Step4: Displaying scalar field"
print "Creating Scalar Map.......",
-scalarmap1 = ScalarMapOnField(med_reader1, cell_entity, 'scalar_field', 1)
+scalarmap1 = ScalarMapOnField(med_reader1, cell_entity, 'scalar field', 1)
if scalarmap1 is None:
print "FAILED"
else:
reset_view(view)
print "Creating Iso Surfaces.....",
-isosurfaces1 = IsoSurfacesOnField(med_reader1, cell_entity, 'scalar_field', 1)
+isosurfaces1 = IsoSurfacesOnField(med_reader1, cell_entity, 'scalar field', 1)
if isosurfaces1 is None:
print "FAILED"
else:
print "OK"
print "Creating Cut Planes.......",
-cutplanes1 = CutPlanesOnField(med_reader1, cell_entity, 'scalar_field', 1,
+cutplanes1 = CutPlanesOnField(med_reader1, cell_entity, 'scalar field', 1,
orientation=Orientation.YZ)
if cutplanes1 is None:
print "FAILED"
print "OK"
mesh_name1 = 'Maillage_MED_HEXA8'
-scalar_field = 'scalar_field'
-vectoriel_field = 'vectoriel_field'
+scalar_field = 'scalar field'
+vectoriel_field = 'vectoriel field'
view = pvsimple.GetRenderView()
print "Creating Scalar Map...................",