import salome
salome.salome_init()
-theStudy = salome.myStudy
###
### GEOM component
import SALOMEDS
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
# first cylinder
r1 = 0.5
import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(theStudy)
+smesh = smeshBuilder.New()
Mesh_with_imprinting_set_by_groups = smesh.Mesh(piquage)
NETGEN_2D_1 = Mesh_with_imprinting_set_by_groups.Triangle(algo=smeshBuilder.NETGEN_1D2D)
Nb_elems_0 = Mesh_with_imprinting_set_by_groups.NbVolumes()
-print "Nb_elems_0: ", Nb_elems_0
+print("Nb_elems_0: ", Nb_elems_0)
Inlet_x_3 = Mesh_with_imprinting_set_by_groups.GroupOnGeom(Inlet_x,'Inlet_x',SMESH.FACE)
Inlet_z_3 = Mesh_with_imprinting_set_by_groups.GroupOnGeom(Inlet_z,'Inlet_z',SMESH.FACE)
Nb_elems_1 = Mesh_with_imprinting_set_by_groups.NbVolumes()
-print "Nb_elems_1: ", Nb_elems_1
+print("Nb_elems_1: ", Nb_elems_1)
# Check that the number of elements is changed by the option
assert Nb_elems_1> 1.5*Nb_elems_0, "Advanced option as text does not work"
-if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(True)
import salome
salome.salome_init()
-theStudy = salome.myStudy
###
### GEOM component
import SALOMEDS
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
O = geompy.MakeVertex(0, 0, 0)
OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
from salome.HYBRIDPlugin import HYBRIDPluginBuilder
-smesh = smeshBuilder.New(theStudy)
+smesh = smeshBuilder.New()
# Hybrid mesh with hexa dominant core
# ===================================
# check that more hexaedra have been genereted
assert nb_hexas_3 > nb_hexas_2
-if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(True)
import salome
salome.salome_init()
-theStudy = salome.myStudy
###
### GEOM component
import SALOMEDS
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
# first cylinder
r1 = 0.5
from salome.StdMeshers import StdMeshersBuilder
-smesh = smeshBuilder.New(theStudy)
+smesh = smeshBuilder.New()
Mesh_faces = smesh.Mesh(face)
Mesh_faces.Triangle(algo=smeshBuilder.MG_CADSurf)
assert Mesh_3.GetGroups()[0].GetName() == 'LayersGroup'
assert Mesh_3.GetGroups()[0].Size() > 0
-if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(1)
import salome
salome.salome_init()
-theStudy = salome.myStudy
###
### GEOM component
import SALOMEDS
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
# first cylinder
r1 = 0.5
from salome.StdMeshers import StdMeshersBuilder
from salome.HYBRIDPlugin import HYBRIDPluginBuilder
-smesh = smeshBuilder.New(theStudy)
+smesh = smeshBuilder.New()
# Viscous layers without imprinting
area_error_3 = abs(smesh.GetArea(gr_2)-smesh.GetArea(gr_3))/smesh.GetArea(gr_2)
assert area_error_3 < 1e-10
-if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(1)
import salome
salome.salome_init()
-theStudy = salome.myStudy
###
### GEOM component
import SALOMEDS
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
# first cylinder
r1 = 0.5
from salome.StdMeshers import StdMeshersBuilder
from salome.HYBRIDPlugin import HYBRIDPluginBuilder
-smesh = smeshBuilder.New(theStudy)
+smesh = smeshBuilder.New()
# Viscous layers with imprinting (hexa core)
# ==========================================
area_error_1 = abs(geom_area-smesh.GetArea(gr_4))/geom_area
assert area_error_1 < 0.025
-
-if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(1)
import salome
salome.salome_init()
-theStudy = salome.myStudy
###
### GEOM component
import SALOMEDS
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
box_side = 200
import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(theStudy)
+smesh = smeshBuilder.New()
Mesh_1 = smesh.Mesh(Box_1)
MG_CADSurf = Mesh_1.Triangle(algo=smeshBuilder.MG_CADSurf)
MG_CADSurf_Parameters_1 = MG_CADSurf.Parameters()
# Check number of pyramids
assert Mesh_2.NbPyramids() > 1000
-
-if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(True)