Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direct Tetgen output different from meshpy output #18

Open
jshenumn opened this issue May 23, 2016 · 2 comments
Open

Direct Tetgen output different from meshpy output #18

jshenumn opened this issue May 23, 2016 · 2 comments

Comments

@jshenumn
Copy link

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.

@inducer
Copy link
Owner

inducer commented May 24, 2016

Meshpy uses tetgen 1.5 internally if i recall correctly. Could you try with that?

@jshenumn
Copy link
Author

Yes, tetgen 1.5 and tetgen 1.4.3 do give me different meshes with same switches.
Interesting! Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants