CGAL produces degenerate cells
Issue #224
resolved
from dolfin import *
mesh = Mesh(Circle(0.0, 0.0, 1.0) - Circle(0.0, 0.0, 0.3), 10)
print 'Minimal radius ratio of mesh:', MeshQuality.radius_ratio_min_max(mesh)[0]
exec(MeshQuality.radius_ratio_matplotlib_histogram(mesh, 200))
for c in cells(mesh):
if c.radius_ratio() < 1e-5:
print 'Degenarate cell', c.index(), ', radius ratio', c.radius_ratio()
for v in vertices(c):
print ' ', v.point().str()
Comments (5)
-
-
reporter Is the code you mention part of DOLFIN or CGAL? If the former is true, this issue can be modified when someone digs into the problem.
-
I'll take a look at this. Garth: I don't think CGAL can mesh implicit surfaces in 2D. The mesh generator in 2D and 3D are very different.
-
@benjamik yes, you're right. I thought I programmed implicit surfaces for 2D, but I did in fact turn circles into polygons too!
-
- changed status to resolved
Fix merged in 80b0906.
- Log in to comment
More specifically, I think you'll find that the CSG code, which turns circles in polygons, is the problem. CGAL meshes generated via implicit surfaces are usually good.