2D mesh generation via CGAL gives wrong result for non-convex domains

Bug #933309 reported by Garth Wells
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DOLFIN
Fix Released
High
Unassigned

Bug Description

I like the new feature to generate complex meshes directly. Here is a small example where I try to generate a stack of layers to be meshed. How do I build the mesh so that it generates the triangles only within the square boundaries?

            ____
______||||||||______
||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||

from dolfin import *
t1 = 1.0
t2 = 0.5
w = 4

x1 = t1
x2 = x1+t2

vertices = [Point(0.0,0.0), Point(x1,0.0), Point(x1,w/2.0-t2/2.0), Point(x2,w/2.0-t2/2.0),
Point(x2,w/2.0+t2/2.0), Point(x1,w/2.0+t2/2.0), Point(x1,w), Point(0.0,w), Point(0.0,0.0)]
mesh = Mesh()
PolygonalMeshGenerator.generate(mesh, vertices,0.25);
plot(mesh, interactive=True)

Related branches

Changed in dolfin:
status: New → Confirmed
importance: Undecided → High
Changed in dolfin:
status: Confirmed → Fix Committed
Changed in dolfin:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.