Can't write SICN value to .pos file using python API
Hello,
I need to read the gamma, SIGE and SICN values of the generated mesh to check the quality of that mesh, using the python API. I achieve this by writing those values to a .pos file and then read those values from that file. It works with gamma and SIGE values but not with SICN values.
gmsh.initialize()
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)
gmsh.model.geo.addPoint(0, .3, 0, lc, 4)
gmsh.model.geo.addLine(1, 2, 1)
gmsh.model.geo.addLine(3, 2, 2)
gmsh.model.geo.addLine(3, 4, 3)
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.mesh.generate(2)
gmsh.option.setNumber('Print.PostSICN', 1)
gmsh.write('test.pos')
After executing this script I get the following error:
fileName = 'test.pos'
def write(fileName):
"""
gmsh.write(fileName)
Write a file. The export format is determined by the file extension.
"""
ierr = c_int()
lib.gmshWrite(
c_char_p(fileName.encode()),
byref(ierr))
if ierr.value != 0:
> raise Exception(logger.getLastError())
E Exception: Unknown element type for ordered monomials: 1
Is there maybe a more direct approach to retrieve the values for the mesh quality instead of writing them into a .pos file with the python API?