I am trying to mesh a geometry using the gmsh python api, however it seems like my algorithm selection option (i.e. gmsh.option.setNumber("Mesh.Algorithm", 8) ) is being ignored. Can anyone tell me if this is a bug or if I am simply making a mistake. This code replicates the problem:
import gmsh
import sys
h=1.0
gmsh.initialize(sys.argv)
#gmsh.option.setNumber("General.Terminal", 1)
#use the quad mesh alogrithm Mesh.Algorithm = 8
gmsh.option.setNumber("Mesh.Algorithm", 8);
model = gmsh.model
model.add("L-Shape")
#have some duplicate points to make this more like my actual problem
coords=[[0,0],[100,0],[100,0],[100,30],[50,30],[50,100],[50,100],[0,100]]
points=[]
lines=[]
#add points
for point in range(len(coords)):
points.append(gmsh.model.geo.addPoint(coords[point][0], coords[point][1], 0,h))
#add lines
for i in range(len(points)):
#print(points[i],points[(i +1) % len(points)])
lines.append(gmsh.model.geo.addLine(points[i],points[(i +1) % len(points)]))
#join lines into a surface!
gmsh.model.geo.addCurveLoop(lines, 1)
gmsh.model.geo.addPlaneSurface([1],1)
#and mesh it!
gmsh.model.geo.synchronize()
gmsh.model.mesh.generate()
gmsh.fltk.run()
gmsh.finalize()
Which generates this (clearly triangular) mesh. How can I get gmsh to use the quad mesh algorithm from within the python API instead?