]> SALOME platform Git repositories - modules/hydro.git/blobdiff - doc/salome/examples/h019_normalCaseManualInterpolZStrickler.py
Salome HOME
Merge branch 'BR_2017_PORTING' into BR_2018_V8_5
[modules/hydro.git] / doc / salome / examples / h019_normalCaseManualInterpolZStrickler.py
index c4442e856bb742f7f0f6cac7a1bae4bc3ae3968c..67374e70049810bd9a5789e1fd487400fd1605be 100644 (file)
@@ -770,7 +770,7 @@ if salome.sg.hasDesktop():
 # --- Z interpolation with HYDRO
 #----------------------
 
-from salome.hydrotools.interpolZ import interpolZ, createZfield2
+from salome.hydrotools.interpolZ import interpolZ
 from salome.hydrotools.controls import controlStatZ
 
 # --- case name in HYDRO
@@ -779,23 +779,27 @@ nomCas = 'garonne_1'
 # --- med file 2D(x,y) of the case produced by SMESH
 
 # --- dictionary [med group name] = region name
-dicoGroupeRegion= dict(garonne_1_litMineur  = 'garonne_1_litMineur',
-                       garonne_1_riveDroite = 'garonne_1_riveDroite',
-                       garonne_1_riveGauche = 'garonne_1_riveGauche',
+dicoGroupeRegion= dict(litMineur  = 'garonne_1_litMineur',
+                       riveDroite = 'garonne_1_riveDroite',
+                       riveGauche = 'garonne_1_riveGauche',
                        )
 # --- value to use for Z when the node is not in a region (used to detect problems)
 zUndef = 90
+# --- interpolation Method: 0 = nearest point on bathymetry (default), 1 = linear interpolation
+interpolMethod = 0
+# --- produce a 3D mesh (Z set to its value instead of 0
+m3d = True
 
 # --- Z interpolation on the bathymety/altimetry on the mesh nodes
-statz = interpolZ(nomCas, fichierMaillage, dicoGroupeRegion, zUndef)
+statz = interpolZ(nomCas, fichierMaillage, dicoGroupeRegion, zUndef, interpolMethod, m3d)
 #print statz
-refstatz = {'garonne_1_riveDroite': (10.88, 32.61, 24.17, 5.12, 17.57, 31.33, 0.25),
-            'garonne_1_riveGauche': (7.72, 71.86, 24.51, 12.18, 12.90, 60.36, 0.25),
-            'garonne_1_litMineur': (2.06, 25.41, 13.93, 4.33, 8.47, 21.78)}
+refstatz = {'riveDroite': (10.88, 32.61, 24.17, 5.12, 17.57, 31.33, 0.25),
+            'riveGauche': (7.72, 71.86, 24.51, 12.18, 12.90, 60.36, 0.25),
+            'litMineur': (2.06, 25.41, 13.93, 4.33, 8.47, 21.78)}
 controlStatZ(statz, refstatz)
 
 # --- add a field on nodes of type double with z values, named "BOTTOM"
-createZfield2(fichierMaillage)
+#createZfield2(fichierMaillage)
 # --- create a field on nodes of type double with srtickler coefficient values, named "BOTTOM FRICTION"
 from salome.hydrotools.interpolS import assignStrickler