diff --git a/tutorials/julia/t2.jl b/tutorials/julia/t2.jl index 206fb5e6f4a275d1d258dffe027355f23e1320b8..dc497eeda2a9f98d2034cb3571981e44c9d0f797 100644 --- a/tutorials/julia/t2.jl +++ b/tutorials/julia/t2.jl @@ -18,10 +18,8 @@ gmsh.model.geo.addLine(4, 1, 4) gmsh.model.geo.addCurveLoop([4, 1, -2, 3], 1) gmsh.model.geo.addPlaneSurface([1], 1) gmsh.model.geo.synchronize() -gmsh.model.addPhysicalGroup(0, [1, 2], 1) -gmsh.model.addPhysicalGroup(1, [1, 2], 2) -gmsh.model.addPhysicalGroup(2, [1], 6) -gmsh.model.setPhysicalName(2, 6, "My surface") +gmsh.model.addPhysicalGroup(1, [1, 2, 4], 5) +gmsh.model.addPhysicalGroup(2, [1], -1, "My surface") gmsh.model.geo.addPoint(0, .4, 0, lc, 5) gmsh.model.geo.addLine(4, 5, 5) @@ -80,8 +78,7 @@ gmsh.model.geo.mesh.setSize([(0,103), (0,105), (0,109), (0,102), (0,28), gmsh.model.geo.synchronize() -gmsh.model.addPhysicalGroup(3, [129,130], 1) -gmsh.model.setPhysicalName(3, 1, "The volume") +gmsh.model.addPhysicalGroup(3, [129,130], 1, "The volume") gmsh.model.mesh.generate(3) diff --git a/tutorials/julia/t3.jl b/tutorials/julia/t3.jl index a25618aa38b69a461e0379f6c0fd5e3324b29297..9a8c0f56dec22f04c7e781a996e741a9767a76bf 100644 --- a/tutorials/julia/t3.jl +++ b/tutorials/julia/t3.jl @@ -20,10 +20,8 @@ function createGeometryAndMesh() gmsh.model.geo.addCurveLoop([4, 1, -2, 3], 1) gmsh.model.geo.addPlaneSurface([1], 1) gmsh.model.geo.synchronize() - gmsh.model.addPhysicalGroup(0, [1, 2], 1) - gmsh.model.addPhysicalGroup(1, [1, 2], 2) - gmsh.model.addPhysicalGroup(2, [1], 6) - gmsh.model.setPhysicalName(2, 6, "My surface") + gmsh.model.addPhysicalGroup(1, [1, 2, 4], 5) + gmsh.model.addPhysicalGroup(2, [1], -1, "My surface") h = 0.1 angle = 90. diff --git a/tutorials/python/t2.py b/tutorials/python/t2.py index 85fb6a7a96f9f15059e9722b91041c64777cc2df..5f695fc81a2a38e3cbfd3077b99b732945017db6 100644 --- a/tutorials/python/t2.py +++ b/tutorials/python/t2.py @@ -29,7 +29,7 @@ gmsh.model.geo.addLine(4, 1, 4) gmsh.model.geo.addCurveLoop([4, 1, -2, 3], 1) gmsh.model.geo.addPlaneSurface([1], 1) gmsh.model.geo.synchronize() -gmsh.model.addPhysicalGroup(0, [1, 2, 4], 5) +gmsh.model.addPhysicalGroup(1, [1, 2, 4], 5) gmsh.model.addPhysicalGroup(2, [1], name="My surface") # We can then add new points and curves in the same way as we did in `t1.py':