export .su2 file in python API incorrectly writes interior physical group to file
When I write a 2D mesh in .su2 format from the python API, I incorrectly get the interior physical group as an additional boundary marker.
Below is a small python script that creates a square with physical markers on all sides. The interior is also a physical group. When I write the mesh to mesh_python.su2, the interior physical group is incorrectly written as an addition marker to the file. This should not happen, for 2D, only 1D groups should be written.
But when I write a mesh_python.msh file from the python api, then load mesh_python.msh in the gmsh GUI and export to .su2, the "interior" physical group is not present as an additional marker. Is there a problem with the script below, or is there a problem with calling the su2 file exporter from the python api?
import gmsh
import sys
# Initialize gmsh:
gmsh.initialize()
factory = gmsh.model.geo
lc = 1
factory.addPoint(0, 0, 0, lc,1)
factory.addPoint(1, 0, 0, lc,2)
factory.addPoint(1, 1, 0, lc,3)
factory.addPoint(0, 1, 0, lc,4)
factory.addLine(1, 2,1)
factory.addLine(2, 3,2)
factory.addLine(3, 4,3)
factory.addLine(4, 1,4)
factory.addCurveLoop([1, 2, 3, 4],1)
factory.addPlaneSurface([1],1)
gmsh.model.geo.addPhysicalGroup(1,[1,2,3,4],name = "wall")
gmsh.model.geo.addPhysicalGroup(2,[1],name = "interior")
factory.synchronize()
gmsh.model.mesh.generate()
gmsh.write("mesh_python.msh")
gmsh.write("mesh_python.su2")
# It finalize the Gmsh API
gmsh.finalize()