109
Delaunay-based meshing Algorithmic issues An introduction to mesh generation Part II : Delaunay-based mesh generation techniques Jean-François Remacle Department of Civil Engineering, Université catholique de Louvain, Belgium Jean-François Remacle Mesh Generation

An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Embed Size (px)

Citation preview

Page 1: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

An introduction to mesh generationPart II : Delaunay-based mesh generation

techniques

Jean-François Remacle

Department of Civil Engineering,Université catholique de Louvain, Belgium

Jean-François Remacle Mesh Generation

Page 2: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Mediator

Let S1 and S2 be two points of R2. We note S1S2 the line going from S1 toS2. The mediator M(S1,S2) is the locus of all the points which areequidistant to S1 and S2.

M(S1,S2) = {P ∈ R2,d(P,S1) = d(P,S2)}

where d(., .) is the euclidian distance between two points of R2.Geometrically, it is the orthogonal bissector of the segment of line betweenthe two points.

S1 S2 R2 S1S2 S1

S2 M(S1, S2) S1 S2

M(S1, S2) = {P ! R2 | d(P, S1) = d(P, S2)},d(·, ·)

S1

d(P, S1) P

d(P, S2)

S2

M

S1 S2

S1 S2

"

Jean-François Remacle Mesh Generation

Page 3: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Partition of the plane

The mediator separates the plane into two regions. The first region containsall the points that are closer to S1, the second one contains the ones that arecloser to S2. Any point of R2M are therefore associated to one of those twopoints.Note that

this relation depends on the way distances are computed,this relation can be defined in Rd.

Jean-François Remacle Mesh Generation

Page 4: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

The Voronoï diagram

Let us consider a set of N points S = {S1, . . . ,SN }.S = {Si}i=1,...,N N

S2

S7

S10

S8

S4S9

S1

S11

S3

S12S5

S6

S2

S7

S10

S8

S4S9

S1

S11

S3

S12S5

S6

!

S2

S7

S10

S8

S4S9

S1

S11

S3

S12S5

S6

C(Si) Si

Si

C(Si) = {P " R2 | d(P, Si) # d(P, Sj), $j %= i}.

!

Jean-François Remacle Mesh Generation

Page 5: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

The Voronoï diagram

We assume that there exists no triplet of points in S that are colinear

S = {Si}i=1,...,N N

S2

S7

S10

S8

S4S9

S1

S11

S3

S12S5

S6

S2

S7

S10

S8

S4S9

S1

S11

S3

S12S5

S6

!

S2

S7

S10

S8

S4S9

S1

S11

S3

S12S5

S6

C(Si) Si

Si

C(Si) = {P " R2 | d(P, Si) # d(P, Sj), $j %= i}.

!

Jean-François Remacle Mesh Generation

Page 6: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

The Voronoï diagram

We assume that there exists no quadruplet of points in S that are cocircularS = {Si}i=1,...,N N

S2

S7

S10

S8

S4S9

S1

S11

S3

S12S5

S6

S2

S7

S10

S8

S4S9

S1

S11

S3

S12S5

S6

!

S2

S7

S10

S8

S4S9

S1

S11

S3

S12S5

S6

C(Si) Si

Si

C(Si) = {P " R2 | d(P, Si) # d(P, Sj), $j %= i}.

!

Jean-François Remacle Mesh Generation

Page 7: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

The Voronoï diagram

The Voronoï cell C(Si) associated to point Si is the locus of points of R2

that are closer to Si than any other point Sj, j = 1, . . . ,N, i 6= j.

S = {Si}i=1,...,N N

S2

S7

S10

S8

S4S9

S1

S11

S3

S12S5

S6

S2

S7

S10

S8

S4S9

S1

S11

S3

S12S5

S6

!

S2

S7

S10

S8

S4S9

S1

S11

S3

S12S5

S6

C(Si) Si

Si

C(Si) = {P " R2 | d(P, Si) # d(P, Sj), $j %= i}.

!

Jean-François Remacle Mesh Generation

Page 8: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Construction of the Voronoï diagram

The Voronoï cell is constructed as follow. Consider all mediators M(Si,Sj).Each of those mediators define a half plane. The Voronoï diagram is the partof the space that is always closer to Si, i.e. that always associate Si to thepoint P, for all possible mediators.

M(Si, Sj) Si

Sj

!

•N

N

••

!

Jean-François Remacle Mesh Generation

Page 9: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Construction of the Voronoï diagram

The set of all Voronoï cells is called the Voronoï diagram of S.

M(Si, Sj) Si

Sj

!

•N

N

••

!

Jean-François Remacle Mesh Generation

Page 10: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Properties of the Voronoï diagram

Voronoï cells are polygons in 2D,polyhedra in 3D and d-polytopes in dD,Voronoï cells are convex,The vertices of the Voronoï are alwayslocated at intersection of 3 mediators,Voronoï cells are either closed or open.They can only be open for points that arelocated on the convex hull of the 2Ddomain.Any points is loacted at the centroïd ofits Voronoï cell.

M(Si, Sj) Si

Sj

!

•N

N

••

!Jean-François Remacle Mesh Generation

Page 11: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Properties of the Voronoï diagram

Voronoï cells are polygons in 2D,polyhedra in 3D and d-polytopes in dD,Voronoï cells are convex,The vertices of the Voronoï are alwayslocated at intersection of 3 mediators,Voronoï cells are either closed or open.They can only be open for points that arelocated on the convex hull of the 2Ddomain.Any points is loacted at the centroïd ofits Voronoï cell.

M(Si, Sj) Si

Sj

!

•N

N

••

!Jean-François Remacle Mesh Generation

Page 12: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Properties of the Voronoï diagram

Voronoï cells are polygons in 2D,polyhedra in 3D and d-polytopes in dD,Voronoï cells are convex,The vertices of the Voronoï are alwayslocated at intersection of 3 mediators,Voronoï cells are either closed or open.They can only be open for points that arelocated on the convex hull of the 2Ddomain.Any points is loacted at the centroïd ofits Voronoï cell.

M(Si, Sj) Si

Sj

!

•N

N

••

!Jean-François Remacle Mesh Generation

Page 13: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Properties of the Voronoï diagram

Voronoï cells are polygons in 2D,polyhedra in 3D and d-polytopes in dD,Voronoï cells are convex,The vertices of the Voronoï are alwayslocated at intersection of 3 mediators,Voronoï cells are either closed or open.They can only be open for points that arelocated on the convex hull of the 2Ddomain.Any points is loacted at the centroïd ofits Voronoï cell.

M(Si, Sj) Si

Sj

!

•N

N

••

!Jean-François Remacle Mesh Generation

Page 14: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Properties of the Voronoï diagram

Voronoï cells are polygons in 2D,polyhedra in 3D and d-polytopes in dD,Voronoï cells are convex,The vertices of the Voronoï are alwayslocated at intersection of 3 mediators,Voronoï cells are either closed or open.They can only be open for points that arelocated on the convex hull of the 2Ddomain.Any points is loacted at the centroïd ofits Voronoï cell.

M(Si, Sj) Si

Sj

!

•N

N

••

!Jean-François Remacle Mesh Generation

Page 15: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Triangulation

The set of points S can be triangulated. This means that we can build a setof triangles with the Si’s as vertices. Note that

All triangulations do not cover the same subset of R2 (this is not thecase in our figure),Even with the same domain to cover, several triangulations arepossible.

M(Si, Sj) Si

Sj

!

•N

N

••

!

Jean-François Remacle Mesh Generation

Page 16: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Delaunay triangulation

Among all possible triangulations, there exists one triangulation based onthe Voronoï diagram. This triangulation is build up as follows:

Each centroid of a Voronoï cell is a point of the triangulation,Each of these centroid is linked with all its neighbors in the Voronoïdiagram,The resulting figure is a triangulation because Voronoï points arealways the meeting points of 3 mediators.

S3

S11S10

S2

S6

S1

S5

S7

S4

S12

S9

S8

S3

S11S10

S2

S6

S1

S5

S7

S4

S12

S9

S8

!

K N

T B N

N + 1 K

K

K

K

K

K

K

!

Jean-François Remacle Mesh Generation

Page 17: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Delaunay triangulation

Because the Voronoï diagram is unique, the Delaunay triangulation is alsounique.

S3

S11S10

S2

S6

S1

S5

S7

S4

S12

S9

S8

S3

S11S10

S2

S6

S1

S5

S7

S4

S12

S9

S8

!

K N

T B N

N + 1 K

K

K

K

K

K

K

!Jean-François Remacle Mesh Generation

Page 18: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Properties of the Delaunay triangulation

By construction, the Delaunay triangulation has the following propertiesElements are simplices (triangles in 2D, tetraedra in 3D...),Elements cover the convex hull and do not overlap,Elements respect the max-min angle principle: the minimum angle forall corners of triangles is maximal in the Delaunay triangulation.

As corrolaries, three very important properties can be establishedElements of the Delaunay triangulation all satisfy the empty sphereproperty,Equilateral triangulation,Duality between Delaunay and Voronoï

Jean-François Remacle Mesh Generation

Page 19: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Properties of the Delaunay triangulation

By construction, the Delaunay triangulation has the following propertiesElements are simplices (triangles in 2D, tetraedra in 3D...),Elements cover the convex hull and do not overlap,Elements respect the max-min angle principle: the minimum angle forall corners of triangles is maximal in the Delaunay triangulation.

As corrolaries, three very important properties can be establishedElements of the Delaunay triangulation all satisfy the empty sphereproperty,Equilateral triangulation,Duality between Delaunay and Voronoï

Jean-François Remacle Mesh Generation

Page 20: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Properties of the Delaunay triangulation

By construction, the Delaunay triangulation has the following propertiesElements are simplices (triangles in 2D, tetraedra in 3D...),Elements cover the convex hull and do not overlap,Elements respect the max-min angle principle: the minimum angle forall corners of triangles is maximal in the Delaunay triangulation.

As corrolaries, three very important properties can be establishedElements of the Delaunay triangulation all satisfy the empty sphereproperty,Equilateral triangulation,Duality between Delaunay and Voronoï

Jean-François Remacle Mesh Generation

Page 21: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Properties of the Delaunay triangulation

By construction, the Delaunay triangulation has the following propertiesElements are simplices (triangles in 2D, tetraedra in 3D...),Elements cover the convex hull and do not overlap,Elements respect the max-min angle principle: the minimum angle forall corners of triangles is maximal in the Delaunay triangulation.

As corrolaries, three very important properties can be establishedElements of the Delaunay triangulation all satisfy the empty sphereproperty,Equilateral triangulation,Duality between Delaunay and Voronoï

Jean-François Remacle Mesh Generation

Page 22: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Properties of the Delaunay triangulation

By construction, the Delaunay triangulation has the following propertiesElements are simplices (triangles in 2D, tetraedra in 3D...),Elements cover the convex hull and do not overlap,Elements respect the max-min angle principle: the minimum angle forall corners of triangles is maximal in the Delaunay triangulation.

As corrolaries, three very important properties can be establishedElements of the Delaunay triangulation all satisfy the empty sphereproperty,Equilateral triangulation,Duality between Delaunay and Voronoï

Jean-François Remacle Mesh Generation

Page 23: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Properties of the Delaunay triangulation

By construction, the Delaunay triangulation has the following propertiesElements are simplices (triangles in 2D, tetraedra in 3D...),Elements cover the convex hull and do not overlap,Elements respect the max-min angle principle: the minimum angle forall corners of triangles is maximal in the Delaunay triangulation.

As corrolaries, three very important properties can be establishedElements of the Delaunay triangulation all satisfy the empty sphereproperty,Equilateral triangulation,Duality between Delaunay and Voronoï

Jean-François Remacle Mesh Generation

Page 24: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

The empty sphere property

Let Ki be a simplex in dD of a triangulation T. Let Bi be the ball that passesthrough the d +1 points of Ki. This ball is called the circumsphere of Ki.A simplex Ki satisfies the empty sphere property if its circumscribed spheredoes not contain any other point of the triangulation.

S3

S11S10

S2

S6

S1

S5

S7

S4

S12

S9

S8

S3

S11S10

S2

S6

S1

S5

S7

S4

S12

S9

S8

!

K N

T B N

N + 1 K

K

K

K

K

K

K

!

Jean-François Remacle Mesh Generation

Page 25: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

The empty sphere property

Any simplex Ki of the Delaunay triangulation satisfiy the empty sphereproperty.If every simplex Ki of a triangulation satisfies the empty sphereproperty, then it is a Delaunay triangulation.

Delaunay ⇐⇒ Empty Sphere

K

K

K

K

K

K

K T

!

S3

S11S10

S2

S6

S1

S5

S7

S4

S12

S9

S8

!

Jean-François Remacle Mesh Generation

Page 26: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Duality Delaunay-Voronoï

To each vertex of the Delaunaytriangulation is associated aVoronoï cell,To each edge of the Delaunaytriangulation is associated anedge (piece of a mediator) of theVoronoï diagram,To each triangle of the Delaunaytriangulation is associated avertex of the Voronoï diagram.

Jean-François Remacle Mesh Generation

Page 27: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Duality Delaunay-Voronoï (in 3D)

To each vertex of the Delaunay tetraedrization is associated a Voronoïcell,To each edge of the Delaunay tetraedrization is associated a face (pieceof a mediator plane) of the Voronoï diagram,To each face of the Delaunay tetraedrization is associated an edge ofthe Voronoï diagram,To each tetraedra of the Delaunay tetraedrization is associated a vertexof the Voronoï diagram.

Jean-François Remacle Mesh Generation

Page 28: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Maxmin property

The Delaunay triangulationmaximizes the minimum of angles formes by triangle edges,minimizes the maximal circumcircle radiuses of triangles in thetriangulation

This property is only valid in 2D. In 2D,

Lemma : if there exists a triangulation for which all angles are acute, it is aDelaunay triangulation.

Jean-François Remacle Mesh Generation

Page 29: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Maxmin property

The Delaunay triangulationmaximizes the minimum of angles formes by triangle edges,minimizes the maximal circumcircle radiuses of triangles in thetriangulation

This property is only valid in 2D. In 2D,

Lemma : if there exists a triangulation for which all angles are acute, it is aDelaunay triangulation.

Jean-François Remacle Mesh Generation

Page 30: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Uniqueness of the Delaunay triangulation (in dD)

The Delaunay triangulation of a set of points S is uniqueif no set of 4 points are co-cyclical in 2Dif no set of 5 points are co-spherical in 3D...

N

NT S

••

!

N

NT

S

T T

!Jean-François Remacle Mesh Generation

Page 31: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Minmax properties (in dD)

If all simplices of Delaunay triangulation contain their circumcenter, itis a Delaunay triangulation.This property is the generalization of the acute angle condition in dD.

In a Delaunay triangulation, the sum of the squares of edge lengthsdivided by the volume of elements adjacent to these edges is minimal.

A Delaunay triangulation is regular, in some sense. Yet, Delaunaytriangulations are not the mostly regular triangulations. In 3D,delaunay triangulation often contain slivers which are elements of verybad quality for computation.

22 J.F. REMACLE, X. LI, M.S. SHEPHARD AND J.E. FLAHERTY.

by the three squares) and a mesh vertex (indicated by the circle). Table II lists the promising localmesh modification operation(s) to be evaluated for each type. To be effective, mesh modifications areevaluated in three priority levels and local mesh modifications in the next priority level are evaluateduntil all mesh modification in previous level can not improve local mesh configuration. In case morethan one operation is possible, the one producing best local mesh configuration is applied.

two key edges

key face

key vertex

type I type II

Figure 12. Sliver tetrahedron types and associated key entities.

Priority Mesh modifications for type I Mesh modifications for type II1 swap either key mesh edge swap the key face or relocate the key vertex2 split either key edge and relocate the new vertex, split the face then split/relocate the new vertex,

split both edges and collapse the interior edge swap the three edges that bound the face3 relocate vertices of the tetrahedron relocate the three vertices that bound the face

Table II. Determination of local mesh modifications.

5. RESULTS

5.1. Cannon Blast Problem

Consider the problem of a 2D perforated tube of diameter 155 mm (a section of a cannon). The diameterof the perforated holes inside the barrel (the muzzle break) are d = 28.6 mm.

The initial conditions for the problem are the one of a shock tube. We consider a virtual interfaceinside the barrel (see mesh refinement for t = 0 at Figure 13). The initial pressure for the gas insideof the tube are P = 57, 273, 627.96 Pa i.e. more than 500 times the external atmospheric pressure ofPatm = 101, 300 Pa. The initial temperature of the air inside the tube is T = 2, 111.5 K and its initialvelocity along x direction is 0.

The final time of the computation was tend = 5 ! 10!4 sec. A second order Runge-Kutta timeintegration scheme was used. The time steps were computed adaptively with a CFL limit of 1.0.Starting time steps were about 5 ! 10!8 seconds and the final time steps were about 1.5 ! 10!8

seconds. The mesh was refined every 10!6 seconds so that the total number of mesh refinements is501, including the initial refinement that enables the correct capture of the initial discontinuous state

Copyright c! 2000 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2000; 00:1–6Prepared using nmeauth.cls

Jean-François Remacle Mesh Generation

Page 32: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Minmax properties (in dD)

If all simplices of Delaunay triangulation contain their circumcenter, itis a Delaunay triangulation.This property is the generalization of the acute angle condition in dD.

In a Delaunay triangulation, the sum of the squares of edge lengthsdivided by the volume of elements adjacent to these edges is minimal.

A Delaunay triangulation is regular, in some sense. Yet, Delaunaytriangulations are not the mostly regular triangulations. In 3D,delaunay triangulation often contain slivers which are elements of verybad quality for computation.

22 J.F. REMACLE, X. LI, M.S. SHEPHARD AND J.E. FLAHERTY.

by the three squares) and a mesh vertex (indicated by the circle). Table II lists the promising localmesh modification operation(s) to be evaluated for each type. To be effective, mesh modifications areevaluated in three priority levels and local mesh modifications in the next priority level are evaluateduntil all mesh modification in previous level can not improve local mesh configuration. In case morethan one operation is possible, the one producing best local mesh configuration is applied.

two key edges

key face

key vertex

type I type II

Figure 12. Sliver tetrahedron types and associated key entities.

Priority Mesh modifications for type I Mesh modifications for type II1 swap either key mesh edge swap the key face or relocate the key vertex2 split either key edge and relocate the new vertex, split the face then split/relocate the new vertex,

split both edges and collapse the interior edge swap the three edges that bound the face3 relocate vertices of the tetrahedron relocate the three vertices that bound the face

Table II. Determination of local mesh modifications.

5. RESULTS

5.1. Cannon Blast Problem

Consider the problem of a 2D perforated tube of diameter 155 mm (a section of a cannon). The diameterof the perforated holes inside the barrel (the muzzle break) are d = 28.6 mm.

The initial conditions for the problem are the one of a shock tube. We consider a virtual interfaceinside the barrel (see mesh refinement for t = 0 at Figure 13). The initial pressure for the gas insideof the tube are P = 57, 273, 627.96 Pa i.e. more than 500 times the external atmospheric pressure ofPatm = 101, 300 Pa. The initial temperature of the air inside the tube is T = 2, 111.5 K and its initialvelocity along x direction is 0.

The final time of the computation was tend = 5 ! 10!4 sec. A second order Runge-Kutta timeintegration scheme was used. The time steps were computed adaptively with a CFL limit of 1.0.Starting time steps were about 5 ! 10!8 seconds and the final time steps were about 1.5 ! 10!8

seconds. The mesh was refined every 10!6 seconds so that the total number of mesh refinements is501, including the initial refinement that enables the correct capture of the initial discontinuous state

Copyright c! 2000 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2000; 00:1–6Prepared using nmeauth.cls

Jean-François Remacle Mesh Generation

Page 33: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Minmax properties (in dD)

If all simplices of Delaunay triangulation contain their circumcenter, itis a Delaunay triangulation.This property is the generalization of the acute angle condition in dD.

In a Delaunay triangulation, the sum of the squares of edge lengthsdivided by the volume of elements adjacent to these edges is minimal.

A Delaunay triangulation is regular, in some sense. Yet, Delaunaytriangulations are not the mostly regular triangulations. In 3D,delaunay triangulation often contain slivers which are elements of verybad quality for computation.

22 J.F. REMACLE, X. LI, M.S. SHEPHARD AND J.E. FLAHERTY.

by the three squares) and a mesh vertex (indicated by the circle). Table II lists the promising localmesh modification operation(s) to be evaluated for each type. To be effective, mesh modifications areevaluated in three priority levels and local mesh modifications in the next priority level are evaluateduntil all mesh modification in previous level can not improve local mesh configuration. In case morethan one operation is possible, the one producing best local mesh configuration is applied.

two key edges

key face

key vertex

type I type II

Figure 12. Sliver tetrahedron types and associated key entities.

Priority Mesh modifications for type I Mesh modifications for type II1 swap either key mesh edge swap the key face or relocate the key vertex2 split either key edge and relocate the new vertex, split the face then split/relocate the new vertex,

split both edges and collapse the interior edge swap the three edges that bound the face3 relocate vertices of the tetrahedron relocate the three vertices that bound the face

Table II. Determination of local mesh modifications.

5. RESULTS

5.1. Cannon Blast Problem

Consider the problem of a 2D perforated tube of diameter 155 mm (a section of a cannon). The diameterof the perforated holes inside the barrel (the muzzle break) are d = 28.6 mm.

The initial conditions for the problem are the one of a shock tube. We consider a virtual interfaceinside the barrel (see mesh refinement for t = 0 at Figure 13). The initial pressure for the gas insideof the tube are P = 57, 273, 627.96 Pa i.e. more than 500 times the external atmospheric pressure ofPatm = 101, 300 Pa. The initial temperature of the air inside the tube is T = 2, 111.5 K and its initialvelocity along x direction is 0.

The final time of the computation was tend = 5 ! 10!4 sec. A second order Runge-Kutta timeintegration scheme was used. The time steps were computed adaptively with a CFL limit of 1.0.Starting time steps were about 5 ! 10!8 seconds and the final time steps were about 1.5 ! 10!8

seconds. The mesh was refined every 10!6 seconds so that the total number of mesh refinements is501, including the initial refinement that enables the correct capture of the initial discontinuous state

Copyright c! 2000 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2000; 00:1–6Prepared using nmeauth.cls

Jean-François Remacle Mesh Generation

Page 34: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Minmax properties (in dD)

If all simplices of Delaunay triangulation contain their circumcenter, itis a Delaunay triangulation.This property is the generalization of the acute angle condition in dD.

In a Delaunay triangulation, the sum of the squares of edge lengthsdivided by the volume of elements adjacent to these edges is minimal.

A Delaunay triangulation is regular, in some sense. Yet, Delaunaytriangulations are not the mostly regular triangulations. In 3D,delaunay triangulation often contain slivers which are elements of verybad quality for computation.

22 J.F. REMACLE, X. LI, M.S. SHEPHARD AND J.E. FLAHERTY.

by the three squares) and a mesh vertex (indicated by the circle). Table II lists the promising localmesh modification operation(s) to be evaluated for each type. To be effective, mesh modifications areevaluated in three priority levels and local mesh modifications in the next priority level are evaluateduntil all mesh modification in previous level can not improve local mesh configuration. In case morethan one operation is possible, the one producing best local mesh configuration is applied.

two key edges

key face

key vertex

type I type II

Figure 12. Sliver tetrahedron types and associated key entities.

Priority Mesh modifications for type I Mesh modifications for type II1 swap either key mesh edge swap the key face or relocate the key vertex2 split either key edge and relocate the new vertex, split the face then split/relocate the new vertex,

split both edges and collapse the interior edge swap the three edges that bound the face3 relocate vertices of the tetrahedron relocate the three vertices that bound the face

Table II. Determination of local mesh modifications.

5. RESULTS

5.1. Cannon Blast Problem

Consider the problem of a 2D perforated tube of diameter 155 mm (a section of a cannon). The diameterof the perforated holes inside the barrel (the muzzle break) are d = 28.6 mm.

The initial conditions for the problem are the one of a shock tube. We consider a virtual interfaceinside the barrel (see mesh refinement for t = 0 at Figure 13). The initial pressure for the gas insideof the tube are P = 57, 273, 627.96 Pa i.e. more than 500 times the external atmospheric pressure ofPatm = 101, 300 Pa. The initial temperature of the air inside the tube is T = 2, 111.5 K and its initialvelocity along x direction is 0.

The final time of the computation was tend = 5 ! 10!4 sec. A second order Runge-Kutta timeintegration scheme was used. The time steps were computed adaptively with a CFL limit of 1.0.Starting time steps were about 5 ! 10!8 seconds and the final time steps were about 1.5 ! 10!8

seconds. The mesh was refined every 10!6 seconds so that the total number of mesh refinements is501, including the initial refinement that enables the correct capture of the initial discontinuous state

Copyright c! 2000 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Engng 2000; 00:1–6Prepared using nmeauth.cls

Jean-François Remacle Mesh Generation

Page 35: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Interior Cavity

We consider a triangulation T and a point P inside T. The cavity CPassociated to P consist in all the simplices for which their circumspherecontains P.

N

y

z

x S2

S4

S1

S3

!

u

erreur = "u # !u" $ CHK

!K

!!"2u!!

• HK K

• !K K

HK

!K

CP P TT

P

!

Jean-François Remacle Mesh Generation

Page 36: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Exterior Cavity

We consider a triangulation T and a point P outside T. The cavity CPassociated to P consist in all the simplices for which their circumspherecontains P completed by all elements that can be formed by joining all theedges (faces in 3D) of T visible by P.

CP P TT P

P T P

P

P

BP P

T P

P P

!

Ti

i S = {Sj}j=1,...,N

Ti+1 Ti P = Si+1

Ti+1 = Ti " CP + BP .

Ti i

S Ti+1

P (i + 1)

Ti P "# CP

CP

P

PP

!

Jean-François Remacle Mesh Generation

Page 37: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

The Bowl

The cavity BP associated to a point P of a triangulation T consist in all thesimplices that are formes with P. The number of elements in the bowl isundertermined.

CP P TT P

P T P

P

P

BP P

T P

P P

!

Ti

i S = {Sj}j=1,...,N

Ti+1 Ti P = Si+1

Ti+1 = Ti " CP + BP .

Ti i

S Ti+1

P (i + 1)

Ti P "# CP

CP

P

PP

!

Jean-François Remacle Mesh Generation

Page 38: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

The Delaunay Kernel

Let us assume that we have build the delaunay triangulation Ti with the firsti points of the set S = S1, . . . ,SN .It is possible to build iteratively the delaunay triangulation Ti+1, i.e. usingTi and P = Si+1. We define the Delaunay kernel as:

Ti+1 = Ti −CP +BP

Theorem : if Ti is the Delaunay triangulation of the convex hull of the i first

points of a set S, then Ti+1, the triangulation constructed using theDelaunay kernel is a Delaunay triangulation Note : the Delaunay kernel is

usually localized in the neighborhood of p. The algorithmic complexityrelated to its computation can be considered as constant.

Jean-François Remacle Mesh Generation

Page 39: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Insertion of an interior point P

From Ti and P = Si+1, we find CP,The cavity CP includes all elements for which their circumsphereincludes P,

CP P TT P

P T P

P

P

BP P

T P

P P

!

Ti

i S = {Sj}j=1,...,N

Ti+1 Ti P = Si+1

Ti+1 = Ti " CP + BP .

Ti i

S Ti+1

P (i + 1)

Ti P "# CP

CP

P

PP

!Jean-François Remacle Mesh Generation

Page 40: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Insertion of an interior point P

From Ti and P = Si+1, we find CP,The cavity CP includes all elements for which their circumsphereincludes P,

CP P TT P

P T P

P

P

BP P

T P

P P

!

Ti

i S = {Sj}j=1,...,N

Ti+1 Ti P = Si+1

Ti+1 = Ti " CP + BP .

Ti i

S Ti+1

P (i + 1)

Ti P "# CP

CP

P

PP

!Jean-François Remacle Mesh Generation

Page 41: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Insertion of an interior point P

The cavity CP is removed from the current triangulation,The bowl BP is added to the triangulation.Ti+1 = Ti −CP +BP

Ti+1 = Ti ! CP + BP

PP

Ti P !" CP

P

P

P

P

#

Ti+1 = Ti ! CP + BP

P

P

P

P

S = {Sj}j=1,...,N

T0

S

Sj j=1,...,N

S

#

Jean-François Remacle Mesh Generation

Page 42: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Insertion of an interior point P

The cavity CP is removed from the current triangulation,The bowl BP is added to the triangulation.Ti+1 = Ti −CP +BP

Ti+1 = Ti ! CP + BP

PP

Ti P !" CP

P

P

P

P

#

Ti+1 = Ti ! CP + BP

P

P

P

P

S = {Sj}j=1,...,N

T0

S

Sj j=1,...,N

S

#

Jean-François Remacle Mesh Generation

Page 43: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Insertion of an interior point P

The cavity CP is removed from the current triangulation,The bowl BP is added to the triangulation.Ti+1 = Ti −CP +BP

Ti+1 = Ti ! CP + BP

PP

Ti P !" CP

P

P

P

P

#

Ti+1 = Ti ! CP + BP

P

P

P

P

S = {Sj}j=1,...,N

T0

S

Sj j=1,...,N

S

#

Jean-François Remacle Mesh Generation

Page 44: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Insertion of an exterior point P

From Ti and P = Si+1, we find CP,The cavity CP includes all elements for which their circumsphereincludes P,

Ti+1 = Ti ! CP + BP

PP

Ti P !" CP

P

P

P

P

#

Ti+1 = Ti ! CP + BP

P

P

P

P

S = {Sj}j=1,...,N

T0

S

Sj j=1,...,N

S

#

Jean-François Remacle Mesh Generation

Page 45: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Insertion of an exterior point P

From Ti and P = Si+1, we find CP,The cavity CP includes all elements for which their circumsphereincludes P,

Ti+1 = Ti ! CP + BP

PP

Ti P !" CP

P

P

P

P

#

Ti+1 = Ti ! CP + BP

P

P

P

P

S = {Sj}j=1,...,N

T0

S

Sj j=1,...,N

S

#

Jean-François Remacle Mesh Generation

Page 46: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Insertion of an exterior point P

The cavity CP is removed from the current triangulation,The bowl BP is added to the triangulation.Ti+1 = Ti −CP +BP

Ti+1 = Ti ! CP + BP

PP

Ti P !" CP

P

P

P

P

#

Ti+1 = Ti ! CP + BP

P

P

P

P

S = {Sj}j=1,...,N

T0

S

Sj j=1,...,N

S

#

Jean-François Remacle Mesh Generation

Page 47: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Insertion of an exterior point P

The cavity CP is removed from the current triangulation,The bowl BP is added to the triangulation.Ti+1 = Ti −CP +BP

Ti+1 = Ti ! CP + BP

PP

Ti P !" CP

P

P

P

P

#

Ti+1 = Ti ! CP + BP

P

P

P

P

S = {Sj}j=1,...,N

T0

S

Sj j=1,...,N

S

#

Jean-François Remacle Mesh Generation

Page 48: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Insertion of an exterior point P

The cavity CP is removed from the current triangulation,The bowl BP is added to the triangulation.Ti+1 = Ti −CP +BP

Ti+1 = Ti ! CP + BP

PP

Ti P !" CP

P

P

P

P

#

Ti+1 = Ti ! CP + BP

P

P

P

P

S = {Sj}j=1,...,N

T0

S

Sj j=1,...,N

S

#

Jean-François Remacle Mesh Generation

Page 49: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

A Delaunay mesher, how it works!

4 additional points are added that encompass the convex hull of S. Twotriangles are first inserted in the triangulation. The advantage is that onlyinterior points will be inserted!

T0

S = {Sj}j=1,...,N

P CP

!

BP P

Ti+1

!Jean-François Remacle Mesh Generation

Page 50: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

A Delaunay mesher, how it works!

The Delaunay Kernel is used sequentially for all points of S.T0

S = {Sj}j=1,...,N

P CP

!

BP P

Ti+1

!

T0

S = {Sj}j=1,...,N

P CP

!

BP P

Ti+1

!

Jean-François Remacle Mesh Generation

Page 51: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

A Delaunay mesher, how it works!

At the end, the elements that contain the four points of the box areremoved. The resulting mesh does not contain necessary the edges of theconvex hull of S.

P

P

P

!

CP

P

Ti " CP

P

P

P

Ti+1 = Ti " CP + BP

P

P

!

Jean-François Remacle Mesh Generation

Page 52: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Computing the Delaunay Kernel ?

If the Delaunay Kernel is used for producing a mesh, the crucial pointis to efficiently find the Delaunay cavity CP of a point P,We’ll see later that a 2D triangulation of N points contains O(2N)

triangles.If all the O(2i) triangles of triangulation Ti have to be checked (point Pis inside or ouside the circumsphere), the algorithmic complexity ofthe algorithm is N2.Using the “4 points box trick” and inserting interior points one by oneusing the Delaunay kernel is perhaps not the best idea for triangulatinga known set of points.Yet, for most finite element applications, the set S is not known apriori.

Jean-François Remacle Mesh Generation

Page 53: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Computing the Delaunay Kernel ?

If the Delaunay Kernel is used for producing a mesh, the crucial pointis to efficiently find the Delaunay cavity CP of a point P,We’ll see later that a 2D triangulation of N points contains O(2N)

triangles.If all the O(2i) triangles of triangulation Ti have to be checked (point Pis inside or ouside the circumsphere), the algorithmic complexity ofthe algorithm is N2.Using the “4 points box trick” and inserting interior points one by oneusing the Delaunay kernel is perhaps not the best idea for triangulatinga known set of points.Yet, for most finite element applications, the set S is not known apriori.

Jean-François Remacle Mesh Generation

Page 54: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Computing the Delaunay Kernel ?

If the Delaunay Kernel is used for producing a mesh, the crucial pointis to efficiently find the Delaunay cavity CP of a point P,We’ll see later that a 2D triangulation of N points contains O(2N)

triangles.If all the O(2i) triangles of triangulation Ti have to be checked (point Pis inside or ouside the circumsphere), the algorithmic complexity ofthe algorithm is N2.Using the “4 points box trick” and inserting interior points one by oneusing the Delaunay kernel is perhaps not the best idea for triangulatinga known set of points.Yet, for most finite element applications, the set S is not known apriori.

Jean-François Remacle Mesh Generation

Page 55: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Computing the Delaunay Kernel ?

If the Delaunay Kernel is used for producing a mesh, the crucial pointis to efficiently find the Delaunay cavity CP of a point P,We’ll see later that a 2D triangulation of N points contains O(2N)

triangles.If all the O(2i) triangles of triangulation Ti have to be checked (point Pis inside or ouside the circumsphere), the algorithmic complexity ofthe algorithm is N2.Using the “4 points box trick” and inserting interior points one by oneusing the Delaunay kernel is perhaps not the best idea for triangulatinga known set of points.Yet, for most finite element applications, the set S is not known apriori.

Jean-François Remacle Mesh Generation

Page 56: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Computing the Delaunay Kernel ?

If the Delaunay Kernel is used for producing a mesh, the crucial pointis to efficiently find the Delaunay cavity CP of a point P,We’ll see later that a 2D triangulation of N points contains O(2N)

triangles.If all the O(2i) triangles of triangulation Ti have to be checked (point Pis inside or ouside the circumsphere), the algorithmic complexity ofthe algorithm is N2.Using the “4 points box trick” and inserting interior points one by oneusing the Delaunay kernel is perhaps not the best idea for triangulatinga known set of points.Yet, for most finite element applications, the set S is not known apriori.

Jean-François Remacle Mesh Generation

Page 57: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Divide and Conquer

There exists a “Divide and Conquer” type of algorithm fortriangulating a known set of points.It allows a O(N logN) complexityDivide and conquer (DC) is an important algorithm design paradigm.It works by recursively breaking down a problem into two or moresub-problems of the same (or related) type, until these become simpleenough to be solved directly. The solutions to the sub-problems arethen combined to give a solution to the original problem.Gmsh provides this kind of algorithm (it is used at some point formesh generation, we’ll see later).

Jean-François Remacle Mesh Generation

Page 58: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Divide and Conquer

There exists a “Divide and Conquer” type of algorithm fortriangulating a known set of points.It allows a O(N logN) complexityDivide and conquer (DC) is an important algorithm design paradigm.It works by recursively breaking down a problem into two or moresub-problems of the same (or related) type, until these become simpleenough to be solved directly. The solutions to the sub-problems arethen combined to give a solution to the original problem.Gmsh provides this kind of algorithm (it is used at some point formesh generation, we’ll see later).

Jean-François Remacle Mesh Generation

Page 59: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Divide and Conquer

There exists a “Divide and Conquer” type of algorithm fortriangulating a known set of points.It allows a O(N logN) complexityDivide and conquer (DC) is an important algorithm design paradigm.It works by recursively breaking down a problem into two or moresub-problems of the same (or related) type, until these become simpleenough to be solved directly. The solutions to the sub-problems arethen combined to give a solution to the original problem.Gmsh provides this kind of algorithm (it is used at some point formesh generation, we’ll see later).

Jean-François Remacle Mesh Generation

Page 60: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Divide and Conquer

There exists a “Divide and Conquer” type of algorithm fortriangulating a known set of points.It allows a O(N logN) complexityDivide and conquer (DC) is an important algorithm design paradigm.It works by recursively breaking down a problem into two or moresub-problems of the same (or related) type, until these become simpleenough to be solved directly. The solutions to the sub-problems arethen combined to give a solution to the original problem.Gmsh provides this kind of algorithm (it is used at some point formesh generation, we’ll see later).

Jean-François Remacle Mesh Generation

Page 61: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Divide and Conquer

The Delaunay Divide and Conquer algorithm starts by sorting the N pointsof S lexicographically.

Jean-François Remacle Mesh Generation

Page 62: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Divide and Conquer

Divide and Conquer algorithm for triangulations in two dimensions isdue to Lee and Schachter which was improved by Guibas and Stolfiand later by Dwyer. In this algorithm, one recursively draws a line tosplit the vertices into two sets. The Delaunay triangulation is computedfor each set, and then the two sets are merged along the splitting line.

Jean-François Remacle Mesh Generation

Page 63: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Divide and Conquer

When the recursion comes to a point when 2 or 3 points are present atthe given level, trivial triangulation is performed. The convex hull oftriangulation parts have to be saved at each stage.

Jean-François Remacle Mesh Generation

Page 64: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Divide and Conquer

Using some clever tricks, the merge operation can be done in timeO(N), so the total running time is O(N logN).

Jean-François Remacle Mesh Generation

Page 65: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Divide and Conquer in Gmsh

The source code can be found in Mesh/DivideAndConquer.cc

The source codeint DelaunayAndVoronoi(DocPeek doc)

{

pPointArray = doc->points;

if(doc->numPoints < 2)

return 1;

qsort(doc->points, doc->numPoints, sizeof(PointRecord),

comparePoints);

recur_trig(0, doc->numPoints - 1);

return 1;

}

Jean-François Remacle Mesh Generation

Page 66: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Divide and Conquer in Gmsh

An example with 200 points

!" !"# $%"&'()# *%# *+,'-.# "'.,'# $%+# &"# $%"&'()# *+# &/'01&)0+.("('2.3# 452',# 6&",,+,# *+752.(#

!"#$%&'!$()*)+'# 8(5+# *)9'.'+,# :*/"%(5+,# 6&",,+,# 12%552.(# 8(5+# *)9'.'+,# +.# 2%(5+# *+#

6+&&+,# &;<3#=.+#6&",,+#12%5#&+,#12'.(,>#%.+#6&",,+#12%5#&+,#(5'".-&+,#+(#%.+#6&",,+#12%5#

&+,#*2..)+,3#!"#6&",,+#?#*2..)+#@#,+5"#%.+#6&",,+#,$('-)##)./-()#*2.(#*+752.(#*)5'7+5#

*+,# 6&",,+,# *+# *2..)+# ,6"&"'5+># 7+6(25'+&&+# +(# (+.,25'+&&+3# A2(+B# $%+# 72%,# "&&+B# 8(5+#

"0+.),#;#0".'1%&+5#*+,#62.(+.+%5,#:&',(+,># ("C&+"%D<#*+#("'&&+#7"5'"C&+#:&+#.20C5+#*+#

(5'".-&+,# "%-0+.(+# +(# 6+5("'.,# (5'".-&+,# ,+52.(# )&'0'.),# *+# &"# &',(+# "%# 62%5,# *+#

&/"&-25'(E0+<3# !/%('&',"('2.# *+# &"# F(".*"5*# 4+01&"(+# !'C5"5G# :F4!>#

HHH3,-'3620I(+6EI,(&<#12%55"'(#72%,#9"6'&'(+5#-5".*+0+.(#&"#(J6E+3#

!"#$%&'()*

!+# *)7+&211+0+.(# *%# !"#$"%&&'# ,+# 9+5"# 2C&'-"(2'5+0+.(# *".,# &/+.7'52..+0+.(# !KA=L3#

M2%5# 6+%D# $%'# %('&',+5"'+.(# &+%5# 25*'."(+%5# 1+5,2..+&# ,2%,#N'.*2H,># 72%,# "7+B# &"# 12,,'C'&'()#

*/'.,("&&+5# %.# +.7'52..+0+.(# *+# (G1+# !KA=L# :-5"(%'(<# +.# ()&)6E"5-+".(# &/+.7'52..+0+.(#

6G-H'.# :HHH36G-H'.3620<3# F'# 72%,# *+7'+B# '.,("&&+5# 6G-H'.># '.,("&&+B# &/+.,+0C&+# *+,#

62012,".(,>#G#62015',#&+,#2%('&,#*+#*)7+&211+0+.(3#K&#+D',(+#%.+#7+5,'2.#0'.'0"&+#*+#6G-H'.#

,%5#E((1OIIHHH30'.-H325-I#$%+#.2%,#./"72.,#1",#75"'0+.(# (+,()+#0"',#$%'# P2%'(#*/%.+#C2..+#

5)1%("('2.3# K&#./+,(#)7'*+00+.(#1",# '.(+5*'(#*+#*)7+&211+5#72(5+#62*+#+.#%('&',".(#"%(5+#6E2,+#

0"',# '&# 9"%(# ,"72'5# $%+# 6+5("'.,# &2-'6'+&,# 6200+56'"%D# C'+.# 62..%,# .+# 92%5.',,+.(# 1",# %.#

6201'&"(+%5# QRR# $%'# 5+,1+6(+# ,65%1%&+%,+0+.(# &"# .250+# SAFK3# T2(5+# 152-5"00+# 12%55"'(#

*2.6#(5U,#C'+.#6201'&+5#,%5#72(5+#1&"(+9250+#0"',#MSF#,2%,#!KA=L3##

!+# &2-'6'+&# -0,E# +,(# ()&)6E"5-+"C&+# +.# 7+5,'2.# +D)6%("C&+# 12%5# &"# 1&%1"5(# *+,# 1&"(+9250+,#

,(".*"5*# :HHH3-+%B325-I-0,E<3# K&# +,(# '.,("&&)# +(# %('&',"C&+# ,%5# &+,# 0"6E'.+,# *%# 5),+"%#

'.9250"('$%+#9"6%&("'5+3#!/+D)6%("C&+#,+#(52%7+#*".,#($')*+,-./*).$&,012T2%,#12%7+B#

"P2%(+5#&"#&'-.+#,%'7".(+#

'3!#"42 56789:5678;($')*+,-./*)2

*".,#&+#9'6E'+5#1/%,0"<#$%'#,+#(52%7+#;#&"#5"6'.+#*+#72(5+#6201(+#%('&',"(+%53#Q+#9"',".(>#72%,#

12%55+B#("1+5#,'01&+0+.(#-0,E#;#1"5('5#*+#./'0125(+#$%+&#5)1+5(2'5+3#

+,-./%-*

T2'6'#%.#+D+01&+#,'01&+#$%'#02.(5+#&+#(G1+#*+#5),%&("(,#"((+.*%,#:&+,#*2..)+,#,2.(#*',12.'C&+,#

,%5#&+#,'(+#N+C#*%#62%5,<3#A2%,#"72.,#-).)5)#;#&/"'*+#*+#VS4!SW#(52',#9'6E'+5,#XD+01&+Y3'.>#

XD+01&+Z3'.# +(#XD+01&+[3'.# $%'# 62.('+..+.(# 5+,1+6('7+0+.(#Z\\>#Z\\\#+(# Z\\\\#12'.(,# +.(5+#

*".,# &+,# '.(+57"&&+,# L#]^Z$# +(# Z$_# +(# `#]^Z$# +(# Z$_3# !+,# 12'.(,# ,2.(# 6E2',',# "%# E","5*#

:92.6('2.#5".*<#+(>#+.#6E"$%+#12'.(#L#`#:5>"%<>#2.#"#6"&6%&)#&"#92.6('2.#7:5>"%<abY:5<,'.:c%<3#!+,#

5),%&("(,#,2.(#15),+.(),#*".,#&+,#d'-%5+,#[>e#+(#c3#

## #

d'-%5+#[#O#f),%&("(,#*+#&"#(5'".-%&"('2.#12%5#&/+D+01&+#XD+01&+Y3'.#"7+6#Z\\#12'.(,3#

Jean-François Remacle Mesh Generation

Page 67: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Divide and Conquer in Gmsh

An example with 2000 points!

!!

!

"#$%&'!(!)!*+,%-./.,!0'!-/!.&#/1$%-/.#21!32%&!-4'5'63-'!75'63-'89#1!/:';!8<<<!32#1.,9!

!

!!

!

"#$%&'!=!)!*+,%-./.,!0'!-/!.&#/1$%-/.#21!32%&!-4'5'63-'!75'63-'>9#1!/:';!8<<<<!32#1.,9!

?2.'@!A%'B!32%&!-',!8<<<<!32#1.,B!-4/-$2&#.C6'!%.#-#,+!3/&!12,!,2#1,!/!1+;',,#.+!D'/%;2%3!62#1,!

04%1'!,';210'!32%&!'EE';.%'&!,21!.&/:/#-!FG%,.'!32%&!:2%,!+1'&:'&!%1!3'%H9!I'-%#!A%#!3/&:#'10&/B!

'1!2%.&'B!J!&+3210&'!J!-/!A%',.#21!,%#:/1.'!D+1+E#;#'&/!0'!12.&'!6/1,%+.%0'!)!

!" 75#,.'K.K#-!%1'!&'-/.#21!'1.&'!-'!126D&'!0'!.&#/1$-',!'.!-'!126D&'!0'!32#1.,!F%1'!E2&6%-'!

A%#!,'&/#.!#10+3'10/1.'!0'!-/!.&#/1$%-/.#21H!L!

M21!.&/:/#-9!

Jean-François Remacle Mesh Generation

Page 68: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Divide and Conquer in Gmsh

An example with 20000 points

!

!!

!

"#$%&'!(!)!*+,%-./.,!0'!-/!.&#/1$%-/.#21!32%&!-4'5'63-'!75'63-'89#1!/:';!8<<<!32#1.,9!

!

!!

!

"#$%&'!=!)!*+,%-./.,!0'!-/!.&#/1$%-/.#21!32%&!-4'5'63-'!75'63-'>9#1!/:';!8<<<<!32#1.,9!

?2.'@!A%'B!32%&!-',!8<<<<!32#1.,B!-4/-$2&#.C6'!%.#-#,+!3/&!12,!,2#1,!/!1+;',,#.+!D'/%;2%3!62#1,!

04%1'!,';210'!32%&!'EE';.%'&!,21!.&/:/#-!FG%,.'!32%&!:2%,!+1'&:'&!%1!3'%H9!I'-%#!A%#!3/&:#'10&/B!

'1!2%.&'B!J!&+3210&'!J!-/!A%',.#21!,%#:/1.'!D+1+E#;#'&/!0'!12.&'!6/1,%+.%0'!)!

!" 75#,.'K.K#-!%1'!&'-/.#21!'1.&'!-'!126D&'!0'!.&#/1$-',!'.!-'!126D&'!0'!32#1.,!F%1'!E2&6%-'!

A%#!,'&/#.!#10+3'10/1.'!0'!-/!.&#/1$%-/.#21H!L!

M21!.&/:/#-9!

Jean-François Remacle Mesh Generation

Page 69: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Geometrical Predicates

The exactness of the Divide and Conquer algorithm heavily relies onthe robustness of one Geometrical Predicate.A predicate is an operator or function which returns a boolean value,true or false.We already know that the computation of the Delaunay kernel alsorelies on the robustness of another Geometrical Predicate (inside oroutside the circumsphere).In general, a predicate is an operator or function which returns aboolean value, true or false.Many other computational geometry applications use numerical testsknown as the orientation and incircle tests.

Jean-François Remacle Mesh Generation

Page 70: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Geometrical Predicates

The exactness of the Divide and Conquer algorithm heavily relies onthe robustness of one Geometrical Predicate.A predicate is an operator or function which returns a boolean value,true or false.We already know that the computation of the Delaunay kernel alsorelies on the robustness of another Geometrical Predicate (inside oroutside the circumsphere).In general, a predicate is an operator or function which returns aboolean value, true or false.Many other computational geometry applications use numerical testsknown as the orientation and incircle tests.

Jean-François Remacle Mesh Generation

Page 71: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Geometrical Predicates

The exactness of the Divide and Conquer algorithm heavily relies onthe robustness of one Geometrical Predicate.A predicate is an operator or function which returns a boolean value,true or false.We already know that the computation of the Delaunay kernel alsorelies on the robustness of another Geometrical Predicate (inside oroutside the circumsphere).In general, a predicate is an operator or function which returns aboolean value, true or false.Many other computational geometry applications use numerical testsknown as the orientation and incircle tests.

Jean-François Remacle Mesh Generation

Page 72: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Geometrical Predicates

The exactness of the Divide and Conquer algorithm heavily relies onthe robustness of one Geometrical Predicate.A predicate is an operator or function which returns a boolean value,true or false.We already know that the computation of the Delaunay kernel alsorelies on the robustness of another Geometrical Predicate (inside oroutside the circumsphere).In general, a predicate is an operator or function which returns aboolean value, true or false.Many other computational geometry applications use numerical testsknown as the orientation and incircle tests.

Jean-François Remacle Mesh Generation

Page 73: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Geometrical Predicates

The exactness of the Divide and Conquer algorithm heavily relies onthe robustness of one Geometrical Predicate.A predicate is an operator or function which returns a boolean value,true or false.We already know that the computation of the Delaunay kernel alsorelies on the robustness of another Geometrical Predicate (inside oroutside the circumsphere).In general, a predicate is an operator or function which returns aboolean value, true or false.Many other computational geometry applications use numerical testsknown as the orientation and incircle tests.

Jean-François Remacle Mesh Generation

Page 74: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Geometrical Predicates

The orientation test determines whether a point lies to the left of, to theright of, or on a line or plane defined by other points.The incircle test determines whether a point lies inside, outside, or on acircle defined by other points.Each of these tests is performed by evaluating the sign of adeterminant. The determinant is expressed in terms of the coordinatesof the points.If these coordinates are expressed as single or double precisionfloating-point numbers, roundoff error may lead to an incorrect resultwhen the true determinant is near zero.In turn, this misinformation can lead an application to fail or produceincorrect results.

Jean-François Remacle Mesh Generation

Page 75: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Geometrical Predicates

The orientation test determines whether a point lies to the left of, to theright of, or on a line or plane defined by other points.The incircle test determines whether a point lies inside, outside, or on acircle defined by other points.Each of these tests is performed by evaluating the sign of adeterminant. The determinant is expressed in terms of the coordinatesof the points.If these coordinates are expressed as single or double precisionfloating-point numbers, roundoff error may lead to an incorrect resultwhen the true determinant is near zero.In turn, this misinformation can lead an application to fail or produceincorrect results.

Jean-François Remacle Mesh Generation

Page 76: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Geometrical Predicates

The orientation test determines whether a point lies to the left of, to theright of, or on a line or plane defined by other points.The incircle test determines whether a point lies inside, outside, or on acircle defined by other points.Each of these tests is performed by evaluating the sign of adeterminant. The determinant is expressed in terms of the coordinatesof the points.If these coordinates are expressed as single or double precisionfloating-point numbers, roundoff error may lead to an incorrect resultwhen the true determinant is near zero.In turn, this misinformation can lead an application to fail or produceincorrect results.

Jean-François Remacle Mesh Generation

Page 77: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Geometrical Predicates

The orientation test determines whether a point lies to the left of, to theright of, or on a line or plane defined by other points.The incircle test determines whether a point lies inside, outside, or on acircle defined by other points.Each of these tests is performed by evaluating the sign of adeterminant. The determinant is expressed in terms of the coordinatesof the points.If these coordinates are expressed as single or double precisionfloating-point numbers, roundoff error may lead to an incorrect resultwhen the true determinant is near zero.In turn, this misinformation can lead an application to fail or produceincorrect results.

Jean-François Remacle Mesh Generation

Page 78: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Geometrical Predicates

The orientation test determines whether a point lies to the left of, to theright of, or on a line or plane defined by other points.The incircle test determines whether a point lies inside, outside, or on acircle defined by other points.Each of these tests is performed by evaluating the sign of adeterminant. The determinant is expressed in terms of the coordinatesof the points.If these coordinates are expressed as single or double precisionfloating-point numbers, roundoff error may lead to an incorrect resultwhen the true determinant is near zero.In turn, this misinformation can lead an application to fail or produceincorrect results.

Jean-François Remacle Mesh Generation

Page 79: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Geometrical Predicates

Jean-François Remacle Mesh Generation

Page 80: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Geometrical Predicates

Jean-François Remacle Mesh Generation

Page 81: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Lawson’s Algorithm

Lawson’s algorithm allow to insert a new point on a given edge orinside a given triangle of an existing triangulationThe number of operations for the insertion is constant. In consequense,the mesh generation process can be performed with a linearcomplexity, i.e. a O(N) complexity.Lawson’s algorithm is well adapted to finite element mesh generation.in this case, the points of S are not known in advance.

Jean-François Remacle Mesh Generation

Page 82: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Lawson’s Algorithm

Lawson’s algorithm allow to insert a new point on a given edge orinside a given triangle of an existing triangulationThe number of operations for the insertion is constant. In consequense,the mesh generation process can be performed with a linearcomplexity, i.e. a O(N) complexity.Lawson’s algorithm is well adapted to finite element mesh generation.in this case, the points of S are not known in advance.

Jean-François Remacle Mesh Generation

Page 83: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Lawson’s Algorithm

Lawson’s algorithm allow to insert a new point on a given edge orinside a given triangle of an existing triangulationThe number of operations for the insertion is constant. In consequense,the mesh generation process can be performed with a linearcomplexity, i.e. a O(N) complexity.Lawson’s algorithm is well adapted to finite element mesh generation.in this case, the points of S are not known in advance.

Jean-François Remacle Mesh Generation

Page 84: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

The edge swap mesh modification operator

In 2D, we consider two triangles that share the same edge,This edge is one of the diagonals of a quadrilateral that is made of therecombination of the two triangles,The edge swapping operator consist in changing the diagonal in thequadrilateral

S2

S4

a4T2a1S1

T4T3

a2 a3T1

T5T6

a5

S3

S2

S4

a4

a1S1

T4T3

a2 a3

T5T6

a5

S3T1 T2

E E ! S

!!

"

Jean-François Remacle Mesh Generation

Page 85: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

The edge swap mesh modification operator

In 2D, we consider two triangles that share the same edge,This edge is one of the diagonals of a quadrilateral that is made of therecombination of the two triangles,The edge swapping operator consist in changing the diagonal in thequadrilateral

S2

S4

a4T2a1S1

T4T3

a2 a3T1

T5T6

a5

S3

S2

S4

a4

a1S1

T4T3

a2 a3

T5T6

a5

S3T1 T2

E E ! S

!!

"

Jean-François Remacle Mesh Generation

Page 86: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

The edge swap mesh modification operator

In 2D, we consider two triangles that share the same edge,This edge is one of the diagonals of a quadrilateral that is made of therecombination of the two triangles,The edge swapping operator consist in changing the diagonal in thequadrilateral

S2

S4

a4T2a1S1

T4T3

a2 a3T1

T5T6

a5

S3

S2

S4

a4

a1S1

T4T3

a2 a3

T5T6

a5

S3T1 T2

E E ! S

!!

"

Jean-François Remacle Mesh Generation

Page 87: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

The edge swap mesh modification operator

The edge swapping operator is a purely topological operator. It doesnot modify the position of the vertices but only changes theconnectivity of the mesh

S2

S4

a4T2a1S1

T4T3

a2 a3T1

T5T6

a5

S3

S2

S4

a4

a1S1

T4T3

a2 a3

T5T6

a5

S3T1 T2

E E ! S

!!

"

Jean-François Remacle Mesh Generation

Page 88: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

The edge swap mesh modification operator

Edge swap cannot be applied ifThe edge has only one neighboring triangle (if the edge is a boundaryedge of the domain)The quadrilaterai is concave.

TDel

S3 S2 S1 S4

S3

T2

T1S2

S1 S4

S3

S2

T1 T2

S1 S4

T2

S2

S1 S4

S3

T1

S1 S4

T1 T2

!

T1

S TDel

T1 TDel

T1

S T2

S

!

Jean-François Remacle Mesh Generation

Page 89: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

The edge swap mesh modification operator

Edge swap cannot be applied ifThe edge has only one neighboring triangle (if the edge is a boundaryedge of the domain)The quadrilaterai is concave.

TDel

S3 S2 S1 S4

S3

T2

T1S2

S1 S4

S3

S2

T1 T2

S1 S4

T2

S2

S1 S4

S3

T1

S1 S4

T1 T2

!

T1

S TDel

T1 TDel

T1

S T2

S

!

Jean-François Remacle Mesh Generation

Page 90: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Multiple edge swaps

Theorem : All triangulations of a given convex hull are equivalent withrespect to a finite number of edge swaps

Corollary : The unique Delaunay triangulation of a convex hull can beconstructed starting from any triangulation, thanks to a finite number ofswaps.

TDel

S3 S2 S1 S4

S3

T2

T1S2

S1 S4

S3

S2

T1 T2

S1 S4

T2

S2

S1 S4

S3

T1

S1 S4

T1 T2

!

T1

S TDel

T1 TDel

T1

S T2

S

!

Jean-François Remacle Mesh Generation

Page 91: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Edge swap vs. Delaunay

If two adjacent triangles violate the empty sphere criterion, then we swapthe edge and the empty sphere criterion is satisfied for those two triangles.

S1

S3

S2

S4

T2T1

!

maxmin

maxmin

" "

!3

!2

!6

!4

!5!1!4 !6

!3

!5

!2!1

T

!

Jean-François Remacle Mesh Generation

Page 92: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Edge swap vs. Delaunay

If the quadrilateral is concave, no edge swap is possible but ...If the quadrilateral is concave, it satisfies the empty sphere criterion.

S1

S3

S2

S4

T2T1

!

maxmin

maxmin

" "

!3

!2

!6

!4

!5!1!4 !6

!3

!5

!2!1

T

!

Jean-François Remacle Mesh Generation

Page 93: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Edge swap vs. Delaunay

If the quadrilateral is concave, no edge swap is possible but ...If the quadrilateral is concave, it satisfies the empty sphere criterion.

S1

S3

S2

S4

T2T1

!

maxmin

maxmin

" "

!3

!2

!6

!4

!5!1!4 !6

!3

!5

!2!1

T

!

Jean-François Remacle Mesh Generation

Page 94: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Method of Lawson

Start with any triangulation,Swap all the edges for which the quadrilateral formed by the twoneighboring triangles violate the empty sphere criterion,Repeat that until every edge is ok.The algorithm usually converges in 4-5 iterations.

Jean-François Remacle Mesh Generation

Page 95: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Method of Lawson

Start with any triangulation,Swap all the edges for which the quadrilateral formed by the twoneighboring triangles violate the empty sphere criterion,Repeat that until every edge is ok.The algorithm usually converges in 4-5 iterations.

Jean-François Remacle Mesh Generation

Page 96: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Method of Lawson

Start with any triangulation,Swap all the edges for which the quadrilateral formed by the twoneighboring triangles violate the empty sphere criterion,Repeat that until every edge is ok.The algorithm usually converges in 4-5 iterations.

Jean-François Remacle Mesh Generation

Page 97: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Method of Lawson

Start with any triangulation,Swap all the edges for which the quadrilateral formed by the twoneighboring triangles violate the empty sphere criterion,Repeat that until every edge is ok.The algorithm usually converges in 4-5 iterations.

Jean-François Remacle Mesh Generation

Page 98: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Mesh generation

We aim at intserting P in a triangulation,

Ti i

S Ti+1

P (i + 1)

P Ti

P

K

K Ti

P

!

P K K

P

Ti Ti+1

P

K

P

Ti+1 P

i + 1

!

Jean-François Remacle Mesh Generation

Page 99: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Mesh generation

Find the element that includes P and split the element in 3sub-elements

Ti i

S Ti+1

P (i + 1)

P Ti

P

K

K Ti

P

!

P K K

P

Ti Ti+1

P

K

P

Ti+1 P

i + 1

!

Jean-François Remacle Mesh Generation

Page 100: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Mesh generation

Use Lawson’s algorithm to improve the connexions,

Ti i

S Ti+1

P (i + 1)

P Ti

P

K

K Ti

P

!

P K K

P

Ti Ti+1

P

K

P

Ti+1 P

i + 1

!

Jean-François Remacle Mesh Generation

Page 101: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Bowyer and Watson Algorithm

Another algorithm to build a Delaunay Triangulation.Theorem : The Delaunay cavity CP is star shaped and simplyconnected.

Let us consider Ti,Find a triangle that is too small (we’ll define later what this means),Insert the point P at the center of the circumcircle of this triangle thathas not the right size,Eliminate locally all triangle that violate the incircle property, thecavity CP is composed of all those eliminated triangles. For that, use adata structure for which every triangle knows about its neighbors,Triangulate the cavity.

Jean-François Remacle Mesh Generation

Page 102: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Bowyer and Watson Algorithm

Another algorithm to build a Delaunay Triangulation.Theorem : The Delaunay cavity CP is star shaped and simplyconnected.

Let us consider Ti,Find a triangle that is too small (we’ll define later what this means),Insert the point P at the center of the circumcircle of this triangle thathas not the right size,Eliminate locally all triangle that violate the incircle property, thecavity CP is composed of all those eliminated triangles. For that, use adata structure for which every triangle knows about its neighbors,Triangulate the cavity.

Jean-François Remacle Mesh Generation

Page 103: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Bowyer and Watson Algorithm

Another algorithm to build a Delaunay Triangulation.Theorem : The Delaunay cavity CP is star shaped and simplyconnected.

Let us consider Ti,Find a triangle that is too small (we’ll define later what this means),Insert the point P at the center of the circumcircle of this triangle thathas not the right size,Eliminate locally all triangle that violate the incircle property, thecavity CP is composed of all those eliminated triangles. For that, use adata structure for which every triangle knows about its neighbors,Triangulate the cavity.

Jean-François Remacle Mesh Generation

Page 104: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Bowyer and Watson Algorithm

Another algorithm to build a Delaunay Triangulation.Theorem : The Delaunay cavity CP is star shaped and simplyconnected.

Let us consider Ti,Find a triangle that is too small (we’ll define later what this means),Insert the point P at the center of the circumcircle of this triangle thathas not the right size,Eliminate locally all triangle that violate the incircle property, thecavity CP is composed of all those eliminated triangles. For that, use adata structure for which every triangle knows about its neighbors,Triangulate the cavity.

Jean-François Remacle Mesh Generation

Page 105: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Bowyer and Watson Algorithm

Another algorithm to build a Delaunay Triangulation.Theorem : The Delaunay cavity CP is star shaped and simplyconnected.

Let us consider Ti,Find a triangle that is too small (we’ll define later what this means),Insert the point P at the center of the circumcircle of this triangle thathas not the right size,Eliminate locally all triangle that violate the incircle property, thecavity CP is composed of all those eliminated triangles. For that, use adata structure for which every triangle knows about its neighbors,Triangulate the cavity.

Jean-François Remacle Mesh Generation

Page 106: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Bowyer and Watson Algorithm

Another algorithm to build a Delaunay Triangulation.Theorem : The Delaunay cavity CP is star shaped and simplyconnected.

Let us consider Ti,Find a triangle that is too small (we’ll define later what this means),Insert the point P at the center of the circumcircle of this triangle thathas not the right size,Eliminate locally all triangle that violate the incircle property, thecavity CP is composed of all those eliminated triangles. For that, use adata structure for which every triangle knows about its neighbors,Triangulate the cavity.

Jean-François Remacle Mesh Generation

Page 107: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Bowyer and Watson Algorithm

Another algorithm to build a Delaunay Triangulation.Theorem : The Delaunay cavity CP is star shaped and simplyconnected.

Let us consider Ti,Find a triangle that is too small (we’ll define later what this means),Insert the point P at the center of the circumcircle of this triangle thathas not the right size,Eliminate locally all triangle that violate the incircle property, thecavity CP is composed of all those eliminated triangles. For that, use adata structure for which every triangle knows about its neighbors,Triangulate the cavity.

Jean-François Remacle Mesh Generation

Page 108: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Bowyer and Watson in Gmsh

The complete header can be found inMesh/meshGFaceDelaunayInsertion.h

The source codestruct MTri3

{

MVertex *v[3];

MTri3 *neigh[3];

};

Jean-François Remacle Mesh Generation

Page 109: An introduction to mesh generation Part II : Delaunay …perso.uclouvain.be/.../teaching/documents/meca2170-jfr-cours2.pdf · An introduction to mesh generation Part II : Delaunay-based

Delaunay-based meshing Algorithmic issues

Bowyer and Watson Algorithm

Illustration:

!"#$%&'()*+,*+-$./*%+*'+01'2$3+

!"# $%&"'()*"$&+'#,-#.-*")'"/#0+112,-#3-%$"&'-1#0%+0%&4$41# &'$4%-11"'$-15#6+)1#-'#3&$-%+'1#)'-#

7)&# 8"# '+)1# 1-%8&%# 0+)%# *"# 3%4"$&+'# ,9)'# $%&"'()*"$-)%# ")$+:"$&7)-# ,-# .-*")'"/5# ;+&$# )'#

-'1-:<*-# ,-# 0+&'$1# =# ># ?!@A555A!6BA# !!&!C!D# -1$# )'# $%&"'(*-# ,-# .-*")'"/# ,-# .EF=G# 1&# -$#

1-)*-:-'$# 1&# 1+'# 3-%3*-# 3&%3+'13%&$# '-# 3+'$&-'$# ")3)'# ")$%-# 0+&'$# 7)-# !&A# !C# -$# !D5# H9-1$# *-#

$I4+%2:-#,)#3-%3*-5#

6+$+'1#7)J&*#-K&1$-#,-#'+:<%-)K#"*(+%&$I:-1#0-%:-$$"'$#,-#$%&"'()*-%#)'#')"(-#,-#0+&'$1#1"'1#

0"11-%#0"%#*"#(4'4%"$&+'#,)#,&"(%"::-#,-#=+%+'+L5#

!9"*(+%&$I:-#,-#M+N/-%#-1$#)'#"*(+%&$I:-#&$4%"$&O5#P*#)$&*&1-#*-#$I4+%2:-#,)#3-%3*-5#H+'1&,4%+'1#

*"#$%&"'()*"$&+'#,-#.-*")'"/#.EF=6G#"8-3#=6#>#?!@A555A!6B5#;+&$#)'#0+&'$#!6Q@#"#RF=6G#FS&()%-#

TG5#!9"*(+%&$I:-#1)&8"'$#0-%:-$#,-#(4'4%-%#*"#$%&"'()*"$&+'#,-#.-*")'"/#.EF=6Q@G#"8-3#=6Q@#>#

?"!@A555A!6A#!6Q@#B5#

$# U'# 3+::-'3-# 0"%# 4*&:&'-%# $+)1# *-1# $%&"'(*-1# ,-# .EF=6G# ,+'$# *-# 3-%3*-# 3&%3+'13%&$#

3+'$&-'$#!6Q@A#-$#3-*"#-'#"33+%,#"8-3#*-#$I4+%2:-#,)#3-%3*-5#P*#-1$#0+11&<*-#,-#,4:+'$%-%#

7)-#*-#0+*/(+'-#VF=6A"!6Q@G#3+'1$%)&$#W#0"%$&%#,-1#$%&"'(*-1#4*&:&'41#-1$#3+'8-K-#-$#,9)'#

1-)*#$-'"'$#FS&()%-#TG5#

$# U'#%-3+'1$%)&$#*"#$%&"'()*"$&+'#-'#%-*&"'$#*-#0+&'$#!6Q@#")K#0+&'$1#,-#RFVG5#U'#+<$&-'$#

"&'1&#)'-#'+)8-**-#$%&"'()*"$&+'#,-#.-*")'"/#FS&()%-#TG5##

# ##

S&()%-#T#X#Y*(+%&$I:-#,-#M+N/-%#-$#Z"$1+'5#

41(&*%+,*2+5(1%#*2+

[-3+'1$%)&%-# )'# +<C-$# W# 0"%$&%# ,-# ,+''4-1# 0"%$&-**-1# -1$# )'# 0%+<*2:-# &:0+%$"'$# -$# "/"'$# ,-#

'+:<%-)1-1#"00*&3"$&+'1#,"'1#,-#'+:<%-)K#,+:"&'-15#V'#:4,-3&'-#0"%#-K-:0*-A#+'#3I-%3I-#W#

%-3+'1$%)&%-# ,-1# :+,2*-1# $%&\,&:-'1&+''-*1# ,-1# +%("'-1# W# 0"%$&%# ,-# 3+)0-1# 13"''-%# ]# -'#

(4+*+(&-A#*"#1$%)3$)%-#,)#1+)1\1+*#W#0"%$&%#,-#:-1)%-1#1&1:&7)-1A#-'#&'(4'&-%&-A#)'#:+,2*-#HYU#

W#0"%$&%#,-#0+&'$1#:-1)%41#1)%#)'-#:"7)-$$-5##

!"#$%&"'()*"$&+'#,-#.-*")'"/#-$#*-#,&"(%"::-#,-#=+%+'+L#,4O&'&11-'$#)'-#$-3I'&7)-#0-%:-$$"'$#

,-#%-3+'1$%)&%-#)'-#1)%O"3-#T.#F+)#)'#8+*):-#1&#+'#$%"8"&**-#-'#^.GA#1&#*9+'#,&10+1-#)'&7)-:-'$#

,-#0+&'$1#1)%#3-$$-#1)%O"3-#F+)#1)%#3-#8+*):-G5#

!-# <)$# ,-# 3-# 0%+C-$# -1$# ,-# 3+'1$%)&%-# )'-# $%&"'()*"$&+'# ,-# .-*")'"/# W# 0"%$&%# ,J)'-# *&1$-# ,-#

,+''4-15#H-1#,+''4-1#1+'$#O+)%'&-1#1+)1#*"#O+%:-#,J)'#O&3I&-%#+%("'&14#,-#*"#O"_+'#1)&8"'$-#X#

Jean-François Remacle Mesh Generation