Bug in model management in python?
Hi! See the below code for posible bug in model management in python:
import gmsh
gmsh.initialize()
gmsh.model.add('model1')
gmsh.model.add('model2')
print(gmsh.model.getCurrent()) # 'model2' as expected
gmsh.model.setCurrent('model1')
print(gmsh.model.getCurrent()) # 'model1' as expected
gmsh.model.add('model3')
print(gmsh.model.getCurrent()) # still 'model1'! BUG?
We can always call gmsh.model.setCurrent('model3')
afterwards, however, according to the docs adding a new model should also set it as current. It seems that first call to setCurrent
breaks this behavior.