Skip to content
Snippets Groups Projects
Select Git revision
  • fb03e12aa29c9fa85518b28bebf2e96b220aae93
  • master default protected
  • alphashapes
  • quadMeshingTools
  • cygwin_conv_path
  • macos_arm64
  • add-transfiniteautomatic-to-geo
  • patch_releases_4_10
  • HierarchicalHDiv
  • isuruf-master-patch-63355
  • hyperbolic
  • hexdom
  • hxt_update
  • jf
  • 1618-pythonocc-and-gmsh-api-integration
  • octreeSizeField
  • hexbl
  • alignIrregularVertices
  • getEdges
  • patch_releases_4_8
  • isuruf-master-patch-51992
  • gmsh_4_11_0
  • gmsh_4_10_5
  • gmsh_4_10_4
  • gmsh_4_10_3
  • gmsh_4_10_2
  • gmsh_4_10_1
  • gmsh_4_10_0
  • gmsh_4_9_5
  • gmsh_4_9_4
  • gmsh_4_9_3
  • gmsh_4_9_2
  • gmsh_4_9_1
  • gmsh_4_9_0
  • gmsh_4_8_4
  • gmsh_4_8_3
  • gmsh_4_8_2
  • gmsh_4_8_1
  • gmsh_4_8_0
  • gmsh_4_7_1
  • gmsh_4_7_0
41 results

t1.jl

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    t1.jl 829 B
    # See the corresponding Python tutorial for detailed comments.
    
    import gmsh
    
    gmsh.initialize()
    
    gmsh.option.setNumber("General.Terminal", 1)
    
    gmsh.model.add("t1")
    
    lc = 1e-2
    gmsh.model.geo.addPoint(0, 0, 0, lc, 1)
    gmsh.model.geo.addPoint(.1, 0,  0, lc, 2)
    gmsh.model.geo.addPoint(.1, .3, 0, lc, 3)
    
    p4 = gmsh.model.geo.addPoint(0, .3, 0, lc)
    
    gmsh.model.geo.addLine(1, 2, 1)
    gmsh.model.geo.addLine(3, 2, 2)
    gmsh.model.geo.addLine(3, p4, 3)
    gmsh.model.geo.addLine(4, 1, p4)
    
    gmsh.model.geo.addCurveLoop([4, 1, -2, 3], 1)
    gmsh.model.geo.addPlaneSurface([1], 1)
    
    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.geo.synchronize()
    
    gmsh.model.mesh.generate(2)
    
    gmsh.write("t1.msh")
    
    gmsh.finalize()