X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH_SWIG%2Fex12_grid17partition.py;h=49dc696b4d95dbc20f44d70a77aab2c34be05fa5;hp=b8f550880a63d8a7cb5f395bf501493ef8b36acc;hb=8d297d6698f361d4f2dde723050bcfbaea050920;hpb=54182913fbb9df65a3f4cc96f55db3618835ecd8 diff --git a/src/SMESH_SWIG/ex12_grid17partition.py b/src/SMESH_SWIG/ex12_grid17partition.py index b8f550880..49dc696b4 100644 --- a/src/SMESH_SWIG/ex12_grid17partition.py +++ b/src/SMESH_SWIG/ex12_grid17partition.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2016 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 @@ -7,7 +7,7 @@ # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License. +# version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -27,16 +27,19 @@ import salome 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 -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() + +import time +t1= time.time() # 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 @@ -56,7 +59,7 @@ g_rayon1 = 20 g_rayon2 = 30 g_rayon3 = 40 -g_grid = 17 +g_grid = 3 g_trim = 1000 @@ -120,6 +123,8 @@ piece = geompy.MakeMultiTranslation2D(c_element, geompy.MakeVectorDXDYDZ(1, 0, 0 piece_id = geompy.addToStudy(piece, "ex12_grid17partition") +t2= time.time() + # Meshing # ======= @@ -139,3 +144,13 @@ hexa.Hexahedron() # ------------- hexa.Compute() + +t3= time.time() + +print ("time geom",t2-t1) +print ("time mesh",t3-t2 ) + +# Update object browser +# --------------------- + +salome.sg.updateObjBrowser()