Salome HOME
projects
/
modules
/
hydro.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'BR_HYDRO_IMPS_WIN' of ssh://gitolite3@git.salome-platform.org/modules...
[modules/hydro.git]
/
doc
/
salome
/
examples
/
h011_normalCaseManualInterpolZ.py
diff --git
a/doc/salome/examples/h011_normalCaseManualInterpolZ.py
b/doc/salome/examples/h011_normalCaseManualInterpolZ.py
index 071974fb54a9c415b9bb4d6cef4651de4a4ff97f..647a8b203b3d5ae60e02cfd217f731e9996cd89d 100644
(file)
--- a/
doc/salome/examples/h011_normalCaseManualInterpolZ.py
+++ b/
doc/salome/examples/h011_normalCaseManualInterpolZ.py
@@
-8,9
+8,9
@@
import salome
salome.salome_init()
theStudy = salome.myStudy
salome.salome_init()
theStudy = salome.myStudy
-
+
#----------------------
#----------------------
-# --- HYDRO
+# --- HYDRO
#----------------------
from HYDROPy import *
#----------------------
from HYDROPy import *
@@
-294,7
+294,7
@@
garonne_1_riveGauche.SetName("garonne_1_riveGauche")
garonne_1_entry = garonne_1.Export( theStudy._get_StudyId() )
#----------------------
garonne_1_entry = garonne_1.Export( theStudy._get_StudyId() )
#----------------------
-# --- Geometry
+# --- Geometry
#----------------------
# Get geometry shape and print debug information
#----------------------
# Get geometry shape and print debug information
@@
-311,7
+311,7
@@
HYDRO_garonne_1 = salome.IDToObject( str( garonne_1_entry ) )
print "Geom shape:", HYDRO_garonne_1
print "Geom shape name:", HYDRO_garonne_1.GetName()
print "Geom shape:", HYDRO_garonne_1
print "Geom shape name:", HYDRO_garonne_1.GetName()
-# --- manual definition: geometrical faces
+# --- manual definition: geometrical faces
[riveGauche,litMineur,riveDroite] = geompy.ExtractShapes(HYDRO_garonne_1, geompy.ShapeType["FACE"], True)
# --- manual definition: useful groups of edges
[riveGauche,litMineur,riveDroite] = geompy.ExtractShapes(HYDRO_garonne_1, geompy.ShapeType["FACE"], True)
# --- manual definition: useful groups of edges
@@
-342,14
+342,24
@@
geompy.addToStudyInFather( HYDRO_garonne_1, bordGaucheDomaine, 'bordGaucheDomain
geompy.addToStudyInFather( HYDRO_garonne_1, bordDroiteDomaine, 'bordDroiteDomaine' )
# --- basic properties control: edges length, surfaces
geompy.addToStudyInFather( HYDRO_garonne_1, bordDroiteDomaine, 'bordDroiteDomaine' )
# --- basic properties control: edges length, surfaces
+
controlGeomProps(geompy, riveGauche, 29149.36918, 35948828.352061)
controlGeomProps(geompy, riveGauche, 29149.36918, 35948828.352061)
+#controlGeomProps(geompy, litMineur, 30337.5484919, 3263628.55399)
+#controlGeomProps(geompy, riveDroite, 32012.3432411, 26177085.4601)
controlGeomProps(geompy, litMineur, 30337.548492, 3488480.304388)
controlGeomProps(geompy, riveDroite, 32012.343241, 25998769.23615)
#----------------------
controlGeomProps(geompy, litMineur, 30337.548492, 3488480.304388)
controlGeomProps(geompy, riveDroite, 32012.343241, 25998769.23615)
#----------------------
-# --- Meshing
+# --- Meshing
#----------------------
#----------------------
+med_file = r'/tmp/garonne_1.med'
+try:
+ os.remove(med_file)
+except OSError:
+ pass
+
+
import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
from salome.hydrotools.controls import controlMeshStats, controlSubMeshStats
import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
from salome.hydrotools.controls import controlMeshStats, controlSubMeshStats
@@
-416,8
+426,12
@@
bordDroiteDomaine_2 = garonne_1.GroupOnGeom(bordDroiteDomaine,'bordDroiteDomaine
SectionsGaronne_3 = garonne_1.GroupOnGeom(SectionsGaronne,'SectionsGaronne',SMESH.NODE)
garonne_1.SetAutoColor( 1 )
SectionsGaronne_3 = garonne_1.GroupOnGeom(SectionsGaronne,'SectionsGaronne',SMESH.NODE)
garonne_1.SetAutoColor( 1 )
-garonne_1.ExportMED(
r'/tmp/garonne_1.med'
, 0, SMESH.MED_V2_2, 1, None ,1)
+garonne_1.ExportMED(
med_file
, 0, SMESH.MED_V2_2, 1, None ,1)
+#controlMeshStats(garonne_1, 1763, 180, 3360)
+#controlSubMeshStats(litMineur_2, 48)
+#controlSubMeshStats(riveDroite_1, 1360)
+#controlSubMeshStats(riveGauche_1, 1952)
controlMeshStats(garonne_1, 3888, 475, 7597)
controlSubMeshStats(litMineur_2, 2384)
controlSubMeshStats(riveDroite_1, 2342)
controlMeshStats(garonne_1, 3888, 475, 7597)
controlSubMeshStats(litMineur_2, 2384)
controlSubMeshStats(riveDroite_1, 2342)
@@
-427,7
+441,7
@@
if salome.sg.hasDesktop():
salome.sg.updateObjBrowser(1)
#----------------------
salome.sg.updateObjBrowser(1)
#----------------------
-# --- Z interpolation with HYDRO
+# --- Z interpolation with HYDRO
#----------------------
from salome.hydrotools.interpolZ import interpolZ, createZfield2
#----------------------
from salome.hydrotools.interpolZ import interpolZ, createZfield2
@@
-437,14
+451,14
@@
from salome.hydrotools.controls import controlStatZ
nomCas = 'garonne_1'
# --- med file 2D(x,y) of the case produced by SMESH
nomCas = 'garonne_1'
# --- med file 2D(x,y) of the case produced by SMESH
-fichierMaillage =
'/tmp/garonne_1.med'
+fichierMaillage =
med_file
# --- dictionary [med group name] = region name
dicoGroupeRegion= dict(litMineur = 'garonne_1_litMineur',
riveDroite = 'garonne_1_riveDroite',
riveGauche = 'garonne_1_riveGauche',
)
# --- dictionary [med group name] = region name
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)
+# --- value to use for Z when the node is not in a region (used to detect problems)
zUndef = 90
# --- Z interpolation on the bathymety/altimetry on the mesh nodes
zUndef = 90
# --- Z interpolation on the bathymety/altimetry on the mesh nodes