meshpy
meshpy copied to clipboard
Direct Tetgen output different from meshpy output
Hi, I am trying to make a mesh for unit cube in tetgen (1.4.3) and meshpy. I got different results. I used the switch in tetgen -pqfa0.03125
I got 27 points and 48 elements.
I use the following code in meshy:
points = [(0.0,0.0,0.0), (1.0,0.0,0.0), (1.0,1.0,0.0), (0.0,1.0,0.0),
(0.0,0.0,1.0), (1.0,0.0,1.0), (1.0,1.0,1.0), (0.0,1.0,1.0)]
point_markers = [1,1,1,1,1,1,1,1]
facets = [[0,1,2,3],
[4,5,6,7],
[0,1,5,4],
[1,2,6,5],
[2,3,7,6],
[3,0,4,7]]
markers = [1,1,1,1,1,1]
print "Tetrahedralization ..."
opts = Options('pqfa0.03125')
#set meshinfo
mesh_info = MeshInfo()
mesh_info.set_points(points,point_markers)
mesh_info.set_facets(facets,markers)
#build mesh
mesh = build(mesh_info, options=opts)
#print the info of mesh
print "=================== Mesh summary =================="
print "Total points: ",len(mesh.points)
print "Total faces: ",len(mesh.faces)
print "Total elements: ",len(mesh.elements)
print "======================================================="
I got 51 points and 88 elements.
I am wondering if I am missing anything in meshy. Thanks in advance.
Meshpy uses tetgen 1.5 internally if i recall correctly. Could you try with that?
Yes, tetgen 1.5 and tetgen 1.4.3 do give me different meshes with same switches. Interesting! Thanks a lot.