CGAL produces degenerate cells

Issue #224 resolved
Jan Blechta created an issue
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)

  1. Prof Garth Wells

    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.

  2. Jan Blechta 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.

  3. Benjamin Dam Kehlet

    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.

  4. Prof Garth Wells

    @benjamik yes, you're right. I thought I programmed implicit surfaces for 2D, but I did in fact turn circles into polygons too!

  5. Log in to comment