Unable to create Second Order Incomplete elements
abhijeet-pandey opened this issue · 0 comments
abhijeet-pandey commented
I am trying to generate 20-noded elements using pygmsh (version 4.11.0). In gmsh this is done by checking the option selecting Tools>options>Use incomplete elements. However, I am unable to do the same using pygmsh api. I am using version 4.11.0.
The 20-noded element is equivalent to vtk element type number 25. The result of the following script is however vtk element type number 29 or 27-noded element irrespective of the value of parameter below "gmsh.model.mesh.SecondOrderIncomplete" is set to 0 or 1.
import gmsh
gmsh.initialize()
gmsh.clear()
gmsh.model.add("t3")
lc = 1e-1
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.mesh.setTransfiniteCurve(1, 4)
gmsh.model.geo.mesh.setTransfiniteCurve(3, 4)
gmsh.model.geo.mesh.setTransfiniteCurve(2, 4)
gmsh.model.geo.mesh.setTransfiniteCurve(4, 4)
gmsh.model.geo.addCurveLoop([4, 1, -2, 3], 1)
gmsh.model.geo.addPlaneSurface([1], 1)
gmsh.model.geo.mesh.setTransfiniteSurface(1, "Left") # [1,2,3,4] list of points
gmsh.model.geo.synchronize()
gmsh.model.geo.extrude([(2, 1)], 0, 0, 1, [2], [1], recombine = True)
gmsh.model.geo.synchronize()
gmsh.model.geo.add_physical_group(3, [1], tag=10, name = "model")
gmsh.model.setPhysicalName(3, 10, "model")
gmsh.model.mesh.generate(3)
gmsh.model.mesh.SecondOrderIncomplete = 0
gmsh.model.mesh.setOrder(2)
gmsh.model.geo.synchronize()
gmsh.write("model.vtk")