Salome HOME
ajustement parametres autotests
[modules/hydro.git] / doc / salome / examples / h018_streamInterpolation.py
index 572bbf815db20ef4602b83d77f01675ebb2aefce..5cda22b9b470af3658246f209d11e012c4737722 100644 (file)
@@ -5,6 +5,10 @@ HYDRO_SAMPLES = os.path.join( os.environ["HYDRO_ROOT_DIR"], "bin/salome/test/HYD
 
 import sys
 import salome
+import os
+HYDRO_SAMPLES = os.path.join( os.environ["HYDRO_ROOT_DIR"], "bin/salome/test/HYDRO")
+
+
 
 salome.salome_init()
 theStudy = salome.myStudy
@@ -14,8 +18,8 @@ theStudy = salome.myStudy
 #----------------------
 
 from HYDROPy import *
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
+from PyQt5.QtCore import *
+from PyQt5.QtGui import *
 
 hydro_doc = HYDROData_Document.Document( theStudy._get_StudyId() )
 
@@ -279,7 +283,7 @@ Stream_1.SetHydraulicAxis( axe )
 for profil in seqProfs:
   Stream_1.AddProfile(profil)
 
-Stream_1.SetDDZ( 0.200 )
+Stream_1.SetDDZ( 0.050 )
 Stream_1.SetSpatialStep( 0.5 )
 
 Stream_1.Update()
@@ -365,9 +369,9 @@ geompy.addToStudyInFather( HYDRO_Case_1, sections, 'sections' )
 
 # --- basic properties control: edges length, surfaces
 
-controlGeomProps(geompy, riveGauche, 355.795218, 7765.650632)
-controlGeomProps(geompy, litMineur,  383.674511, 3410.00875 )
-controlGeomProps(geompy, riveDroite, 419.322218, 2549.630118)
+controlGeomProps(geompy, riveGauche, 355.239855, 7755.628676)
+controlGeomProps(geompy, litMineur,  383.395884, 3432.296956)
+controlGeomProps(geompy, riveDroite, 419.214176, 2537.363869)
 
 #----------------------
 # --- Meshing
@@ -444,7 +448,7 @@ except:
 
 controlMeshStats(plaine, 1680, 227, 3251)
 controlSubMeshStats(litMineur_2, 2400)
-controlSubMeshStats(riveDroite_1, 271)
+controlSubMeshStats(riveDroite_1, 257)
 controlSubMeshStats(riveGauche_1, 580)
 
 #----------------------
@@ -470,7 +474,10 @@ zUndef = 110
 
 # --- Z interpolation on the bathymety/altimetry on the mesh nodes
 statz = interpolZ(nomCas, fichierMaillage, dicoGroupeRegion, zUndef)
-refstatz = {'riveDroite': (99.8278, 100.8), 'riveGauche': (100.0, 100.0), 'litMineur': (80.4541, 100.8)}
+#print statz
+refstatz = {'riveDroite': (100.0, 100.0, 100.0, 0.0, 100.0, 100.0),
+            'riveGauche': (100.0, 100.0, 100.0, 0.0, 100.0, 100.0),
+            'litMineur': (80.35, 100.0, 92.88, 4.82, 84.44, 100.0)}
 controlStatZ(statz, refstatz)
 
 # --- add a field on nodes of type double with z values, named "BOTTOM"