Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of https://codev-tuleap.cea.fr/plugins/git/salome/smesh
[modules/smesh.git]
/
src
/
SMESH_SWIG
/
ex12_grid17partition.py
diff --git
a/src/SMESH_SWIG/ex12_grid17partition.py
b/src/SMESH_SWIG/ex12_grid17partition.py
index cf311ed616a9f7aaa5be1e9a46c0c7b2008861b8..13cfc13a2bc2344b4fe19eac0568cca9a53cf8db 100644
(file)
--- a/
src/SMESH_SWIG/ex12_grid17partition.py
+++ b/
src/SMESH_SWIG/ex12_grid17partition.py
@@
-1,5
+1,5
@@
# -*- coding: iso-8859-1 -*-
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-20
16
CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-20
20
CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-27,16
+27,19
@@
import salome
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(
salome.myStudy
)
+geompy = geomBuilder.New()
import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(salome.myStudy)
+smesh = smeshBuilder.New()
+
+import time
+t1= time.time()
# Geometry
# ========
# Geometry
# ========
-# grid compound of
17 x 17
elements
+# grid compound of
3 x 3
elements
# an element is compound of 3 concentric cylinders
# an element is centered in a square of the grid
# an element is compound of 3 concentric cylinders
# an element is centered in a square of the grid
@@
-56,7
+59,7
@@
g_rayon1 = 20
g_rayon2 = 30
g_rayon3 = 40
g_rayon2 = 30
g_rayon3 = 40
-g_grid =
17
+g_grid =
3
g_trim = 1000
g_trim = 1000
@@
-120,6
+123,8
@@
piece = geompy.MakeMultiTranslation2D(c_element, geompy.MakeVectorDXDYDZ(1, 0, 0
piece_id = geompy.addToStudy(piece, "ex12_grid17partition")
piece_id = geompy.addToStudy(piece, "ex12_grid17partition")
+t2= time.time()
+
# Meshing
# =======
# Meshing
# =======
@@
-140,7
+145,12
@@
hexa.Hexahedron()
hexa.Compute()
hexa.Compute()
+t3= time.time()
+
+print ("time geom",t2-t1)
+print ("time mesh",t3-t2 )
+
# Update object browser
# ---------------------
# Update object browser
# ---------------------
-salome.sg.updateObjBrowser(
1
)
+salome.sg.updateObjBrowser()