An introduction to mesh generation Part III : Finite...
Transcript of An introduction to mesh generation Part III : Finite...
Finite Element Mesh Generation
An introduction to mesh generationPart III : Finite Element Mesh Generation
Jean-François Remacle
Department of Civil Engineering,Université catholique de Louvain, Belgium
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Euler-Poincaré
A mesh M is a geometrical discretization of a domain Ω that consists ofA collection of mesh entities Md
i of controlled size and distribution;Topological relationships or adjacencies forming the graph of themesh.In unstructured meshes, those relationships are explicit, i.e. they haveto be given explicitely.In other words, the relations between the number of mesh vertices,edges, faces and regions is unknown a prioriYet, topology provides some general relations.. explicitely.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Euler-Poincaré
A mesh M is a geometrical discretization of a domain Ω that consists ofA collection of mesh entities Md
i of controlled size and distribution;Topological relationships or adjacencies forming the graph of themesh.In unstructured meshes, those relationships are explicit, i.e. they haveto be given explicitely.In other words, the relations between the number of mesh vertices,edges, faces and regions is unknown a prioriYet, topology provides some general relations.. explicitely.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Euler-Poincaré
A mesh M is a geometrical discretization of a domain Ω that consists ofA collection of mesh entities Md
i of controlled size and distribution;Topological relationships or adjacencies forming the graph of themesh.In unstructured meshes, those relationships are explicit, i.e. they haveto be given explicitely.In other words, the relations between the number of mesh vertices,edges, faces and regions is unknown a prioriYet, topology provides some general relations.. explicitely.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Euler-Poincaré
A mesh M is a geometrical discretization of a domain Ω that consists ofA collection of mesh entities Md
i of controlled size and distribution;Topological relationships or adjacencies forming the graph of themesh.In unstructured meshes, those relationships are explicit, i.e. they haveto be given explicitely.In other words, the relations between the number of mesh vertices,edges, faces and regions is unknown a prioriYet, topology provides some general relations.. explicitely.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Euler-Poincaré
A mesh M is a geometrical discretization of a domain Ω that consists ofA collection of mesh entities Md
i of controlled size and distribution;Topological relationships or adjacencies forming the graph of themesh.In unstructured meshes, those relationships are explicit, i.e. they haveto be given explicitely.In other words, the relations between the number of mesh vertices,edges, faces and regions is unknown a prioriYet, topology provides some general relations.. explicitely.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Euler-Poincaré (3D)
The Euler-Poincaré formula describes the relationship of the number ofvertices, the number of edges and the number of faces of the cellulardecomposition (a mesh) of a manifold. It has been generalized to includepotholes and holes that penetrate the solid. To state the Euler-Poincaréformula, we need the following definitions:
#V is the number of vertices in the mesh,#E is the number of edges in the mesh,#F is the number of faces in the mesh.G is the number of holes that penetrate the solid, usually referred to asgenus in topologyS is the number of shells. A shell is an internal void of a solid. A shellis bounded by a 2-manifold surface, which can have its own genusvalue. Note that the solid itself is counted as a shell. Therefore, thevalue for #S is at least 1.L is the number of loops. All outer and inner loops of faces arecounted.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Euler-Poincaré (3D)
The Euler-Poincaré formula is
#V −#E +#F −(L−#F)−2(S−G) = 0.
A cube has eight vertices (#V = 8), 12 edges (#E = 12) and six faces(#F = 6), no holes and one shell (S = 1); but #L = #F since each facehas only one outer loop. Therefore, we have
#V −#E+#F−(L−#F)−2(S−G) = 8−12+6−(6−6)−2(1−0) = 0.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Euler-Poincaré
The following solid has 16 vertices, 24 edges, 10 faces, 1 hole (i.e.,genus is 1), 1 shell and 12 loops (10 faces + 2 inner loops on top andbottom faces). Therefore,
#V −#E+#F−(L−#F)−2(S−G) = 16−24+10−(12−10)−2(1−1) = 0.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Euler-Poincaré (2D)
Consider M, a 2D mesh of a domain Ω.#V is the number of vertices in the mesh,#E is the number of edges in the mesh,#F is the number of faces in the mesh.
The Euler-Poincaré relation gives the following relation between thosequantities:
#V −#E +#F −χ(Ω) = 0
where χ(Ω) is the Euler-Poincaré characteristic of the surface.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Euler-Poincaré (2D)
The genus of different surfaces is given
for the sphere, χ = 2 (#V −#E +#F = 2−4+4),for the torus, χ = 0 (#V −#E +#F = 4−8+4),for the disk, χ = 1,for the Klein bootle, χ = 1.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Euler-Poincaré (2D)
Another form of the relation, more useful for general domains:
χ = #V −#E +#F = 2−2g+b
whereb is the number of boundaries (1 for the plane or 0 for a torus or asphere),g is the genus of the surface. The genus is the largest number ofnonintersecting simple closed curves that can be drawn on the surfacewithout separating it. Roughly speaking, it is the number of holes in asurface.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Euler-Poincaré (triangular meshes)
We consider a mesh of a domain that is isomorph to a disk. Then, thefollowing relation holds
#F +2(#V −1)−#Vb = 0
where #Vb is the number of vertices on b.This is an important relation that gives a relation between the number oftriangles and the number of vertices in a triangular mesh.
Demonstration :The relation is true for one only triangle.All triangulations with #N given are equivalent. Edge swaps allow totransform a given triangulation to any other.An edge swap does not modify neither #V nor#F.Inserting a point inside a triangle adds one vertex, 2 triangles and 3edge, so the relation is recurrent.Inserting a point on the boundary adds one vertex, one triangle, 2edges and one boundary point.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Euler-Poincaré (triangular meshes)
We consider a mesh of a domain that is isomorph to a disk. Then, thefollowing relation holds
#F +2(#V −1)−#Vb = 0
where #Vb is the number of vertices on b.This is an important relation that gives a relation between the number oftriangles and the number of vertices in a triangular mesh.
Demonstration :The relation is true for one only triangle.All triangulations with #N given are equivalent. Edge swaps allow totransform a given triangulation to any other.An edge swap does not modify neither #V nor#F.Inserting a point inside a triangle adds one vertex, 2 triangles and 3edge, so the relation is recurrent.Inserting a point on the boundary adds one vertex, one triangle, 2edges and one boundary point.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Euler-Poincaré (triangular meshes)
We consider a mesh of a domain that is isomorph to a disk. Then, thefollowing relation holds
#F +2(#V −1)−#Vb = 0
where #Vb is the number of vertices on b.This is an important relation that gives a relation between the number oftriangles and the number of vertices in a triangular mesh.
Demonstration :The relation is true for one only triangle.All triangulations with #N given are equivalent. Edge swaps allow totransform a given triangulation to any other.An edge swap does not modify neither #V nor#F.Inserting a point inside a triangle adds one vertex, 2 triangles and 3edge, so the relation is recurrent.Inserting a point on the boundary adds one vertex, one triangle, 2edges and one boundary point.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Euler-Poincaré (triangular meshes)
We consider a mesh of a domain that is isomorph to a disk. Then, thefollowing relation holds
#F +2(#V −1)−#Vb = 0
where #Vb is the number of vertices on b.This is an important relation that gives a relation between the number oftriangles and the number of vertices in a triangular mesh.
Demonstration :The relation is true for one only triangle.All triangulations with #N given are equivalent. Edge swaps allow totransform a given triangulation to any other.An edge swap does not modify neither #V nor#F.Inserting a point inside a triangle adds one vertex, 2 triangles and 3edge, so the relation is recurrent.Inserting a point on the boundary adds one vertex, one triangle, 2edges and one boundary point.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Euler-Poincaré (triangular meshes)
We consider a mesh of a domain that is isomorph to a disk. Then, thefollowing relation holds
#F +2(#V −1)−#Vb = 0
where #Vb is the number of vertices on b.This is an important relation that gives a relation between the number oftriangles and the number of vertices in a triangular mesh.
Demonstration :The relation is true for one only triangle.All triangulations with #N given are equivalent. Edge swaps allow totransform a given triangulation to any other.An edge swap does not modify neither #V nor#F.Inserting a point inside a triangle adds one vertex, 2 triangles and 3edge, so the relation is recurrent.Inserting a point on the boundary adds one vertex, one triangle, 2edges and one boundary point.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Euler-Poincaré (triangular meshes)
Asymptotically#F =' 2#V , there are about 2 times more triangles than nodes.#V −#E +#F ' 0, which gives 3#V ' #E : the number of edges isabout 3 times the number of vertices.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Euler-Poincaré (triangular meshes)
Asymptotically#F =' 2#V , there are about 2 times more triangles than nodes.#V −#E +#F ' 0, which gives 3#V ' #E : the number of edges isabout 3 times the number of vertices.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Euler-Poincaré (tet. meshes)
We consider a tet. mesh of a 3D domain that is isomorphic to a sphere. Thefollowing relation holds
#E −#R = #V +#Vb −3
where #Vb is the number of vertices on the boundary.
This relation states that, for any tetraedrization of the domain, the differencebetween the number of edges and elements is constant.
There exist no relation between the number of tets. and the number ofnodes, as it exists in 2D. For exmaple, it is possible to define a “face swap”transformation : 2 tets that have a face in common are transformed in 3 tetswithout changing the number of vertices. Yet one additional edge has to beadded to the mesh in order to verify the relation.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Euler-Poincaré (tet. meshes)
Asymptotically Euler-Poincaré gives:
#V −#E +#F −#R' 0.
This relation is true if #E = (n+1)#V , #F = 2n#V and #R = n#V for anypoistive integer n.
It seems that n = 6 is a good bound. For very regular fine 3D tet. meshes, agood bound is n = 5.6.
Tetrahedral Mesh T Hexahedral Mesh H#R(T) = 6#V(T)
#F(T) = 12#V(T)
#E(T) = 7#V(T)
#R(H) = #V(H)
#F(H) = 3#V(H)
#E(H) = 3#V(H)
Table: Relation between number of entities in a mesh.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Other statistics
A second interesting set of statistics concerns the average number of meshentities of dimension d adjacent to a mesh entity of dimension q. We callthis Nd(Mq). These statistics are represented in this table
Tetrahedral Mesh T Hexahedral Mesh Hd 3 2 1 0
N3(Md) 1 2 5 23N2(Md) 4 1 5 35N1(Md) 6 3 1 14N0(Md) 4 3 2 1
d 3 2 1 0N3(Md) 1 2 4 8N2(Md) 6 1 4 12N1(Md) 12 4 1 6N0(Md) 8 4 2 1
Table: Average number of adjacencies per entity
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Data structures
Each mesh generation algorithms require an appropriate choice of thedata structures,The issue is principally the memory signature of the mesh generator,not the c.p.u.Any “good” 3D mesh generator is able to build more that a milliontets/minute.Large finite element computations can take days of computations onparallel computers. So, waiting 10 minutes for building a 3D mesh ofmore than a million nodes is not an issue.Most meshers cannot build meshes of 1 million nodes on oneprocessor without saturating the memory.Consequently, data structures should be as light as possible.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Data structures
Each mesh generation algorithms require an appropriate choice of thedata structures,The issue is principally the memory signature of the mesh generator,not the c.p.u.Any “good” 3D mesh generator is able to build more that a milliontets/minute.Large finite element computations can take days of computations onparallel computers. So, waiting 10 minutes for building a 3D mesh ofmore than a million nodes is not an issue.Most meshers cannot build meshes of 1 million nodes on oneprocessor without saturating the memory.Consequently, data structures should be as light as possible.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Data structures
Each mesh generation algorithms require an appropriate choice of thedata structures,The issue is principally the memory signature of the mesh generator,not the c.p.u.Any “good” 3D mesh generator is able to build more that a milliontets/minute.Large finite element computations can take days of computations onparallel computers. So, waiting 10 minutes for building a 3D mesh ofmore than a million nodes is not an issue.Most meshers cannot build meshes of 1 million nodes on oneprocessor without saturating the memory.Consequently, data structures should be as light as possible.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Data structures
Each mesh generation algorithms require an appropriate choice of thedata structures,The issue is principally the memory signature of the mesh generator,not the c.p.u.Any “good” 3D mesh generator is able to build more that a milliontets/minute.Large finite element computations can take days of computations onparallel computers. So, waiting 10 minutes for building a 3D mesh ofmore than a million nodes is not an issue.Most meshers cannot build meshes of 1 million nodes on oneprocessor without saturating the memory.Consequently, data structures should be as light as possible.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Data structures
Each mesh generation algorithms require an appropriate choice of thedata structures,The issue is principally the memory signature of the mesh generator,not the c.p.u.Any “good” 3D mesh generator is able to build more that a milliontets/minute.Large finite element computations can take days of computations onparallel computers. So, waiting 10 minutes for building a 3D mesh ofmore than a million nodes is not an issue.Most meshers cannot build meshes of 1 million nodes on oneprocessor without saturating the memory.Consequently, data structures should be as light as possible.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Data structures
Each mesh generation algorithms require an appropriate choice of thedata structures,The issue is principally the memory signature of the mesh generator,not the c.p.u.Any “good” 3D mesh generator is able to build more that a milliontets/minute.Large finite element computations can take days of computations onparallel computers. So, waiting 10 minutes for building a 3D mesh ofmore than a million nodes is not an issue.Most meshers cannot build meshes of 1 million nodes on oneprocessor without saturating the memory.Consequently, data structures should be as light as possible.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Data structures
If we consider that each adjacency has a unit storage, the total storage costfor a given representation can be computed as follow:
C(I,M) =
4∑d=0
4∑q=0
Nd(M)Id,qNd(Mq) (1)
A mesh representation is said to be complete if any adjacencies can beretrieved for any mesh entity without a global traversal of the mesh. In theother case, the representations are termed incomplete.
In a complete representation, any adjacency requires a number of operationsthat does not depend on the size of the mesh. In an incompleterepresentation, getting some adjacencies will require a complete traversal ofthe mesh containers (referred to as linear behavior). It is evident that wecannot afford this traversal each time we ask for an adjacency. Completerepresentations are then the only acceptable mesh representations if we areto work with a single I for all the mesh related algorithms.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Incidence matrices
I2 =
1 0 0 00 0 0 00 0 0 01 0 0 1
I3 =
1 0 0 01 1 0 01 1 1 01 1 1 1
I ′3 =
1 0 0 01 1 0 00 1 1 00 0 1 1
C(I2,T) = 31N0 C(I3,T) = 232N0 C(I ′
3,T) = 100N0
C(I2,H) = 10N0 C(I3,H) = 64N0 C(I ′3,H) = 32N0
I4 =
1 1 0 01 1 0 00 0 0 00 1 0 1
I5 =
1 0 0 10 0 0 00 0 0 01 0 0 1
I6 =
1 0 1 00 0 0 01 0 1 00 0 1 1
C(I4,T) = 103N0 C(I5,T) = 64N0 C(I6,T) = 164N0
C(I4,H) = 24N0 C(I5,H) = 18N0 C(I6,H) = 35N0
Table: Some classical mesh adjacencies requirements: I2 for Lagrangian finiteelements, I3 and I ′
3 for Hierarchical finite elements, I4 for Finite Volumes orDiscontinuous Galerkin solvers, I5 for mesh smoothing and I6 for edge swapping.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Complete representations
Iol =
1 1 0 01 1 1 00 1 1 10 0 1 1
Icirc =
1 0 0 11 1 0 00 1 1 00 0 1 1
C(Iol,T) = 163N0 C(Icirc,T) = 123N0
C(Iol,H) = 56N0 C(Icirc,H) = 33N0
Table: Some complete representations. The unidirectional representation is used inGmsh.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Mesh generation
Mesh generation often uses CAD modelsas input,A 3D model can be defined using itsBoundary Representation (BRep). Anyvolume (or region) is bounded by a set ofsurfaces and a surface is bounded by aserie of curves. Finally, a curve isbounded by two end points.Solid modelers usually provide an APIfor the creation, manipulation,interrogation and storage of 3D models.
C. Geuzaine and J.-F. Remacle · 5
Fig. 4. CAD model of a propeller (left) and its volume mesh (right)
There are various ways to define the mesh size field. In Gmsh, the user canprovide a mesh size field that is defined on another mesh (a background mesh) ofthe domain and/or provide mesh sizes associated with model entities or adapt themesh to the geometry of the model using curvatures. When two size fields !1(x, y, z)and !2(x, y, z) are provided, we use the minimum of both functions as size field.
3.2 1D mesh generation
Let us consider a curve "c(#) : [#1, #2] ! R3. The number of subdivisions N of thecurve is a function of the size field
N =
! !2
!1
1
!(x, y, z)"d!"c"d#.
The N +1 mesh points on the curve are located at coordinates #0, . . . , #N where#i is computed using the following rule
i =
! !i
!1
1
!(x, y, z)"d!"c"d#.
In Gmsh, we compute this primitive using a recursive integration rule.
3.3 2D mesh generation
Curved surface shapes designed by CAD system are usually defined by parametricsurfaces, for example, NURBS [?]. Let us consider a model face G2
i with its un-derlying geometry, in this case a surface S(u, v) # R3. The domain of definitionof parameters (u, v) is defined by a serie of boundary curves. Figure 5 shows oneof the 76 model faces of the propeller. Left part of the figure shows the surface inthe parametric space while the right one is for the real space. This surface con-
ACM Transactions on Mathematical Software, Vol. V, No. N, March 2007.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Geometry engineComputational Modeling Sciences Department
6
Geometry
vertices:
x,y,z location
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Geometry engineComputational Modeling Sciences Department
7
Geometry
vertices:
x,y,z location
curves: bounded
by two vertices
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Geometry engineComputational Modeling Sciences Department
8
Geometry
vertices:
x,y,z location
surfaces: closed
set of curvescurves: bounded
by two vertices
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Geometry engineComputational Modeling Sciences Department
9
Geometry
vertices:
x,y,z location
surfaces: closed
set of curves
volumes: closed
set of surfaces
curves: bounded
by two vertices
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Geometry engineComputational Modeling Sciences Department
11
Geometry
body: collection
of volumes
vertices:
x,y,z location
volumes: closed
set of surfaces
surfaces: closed
set of curves
loops: ordered
set of curves on
surface
curves: bounded
by two vertices
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Geometry engineComputational Modeling Sciences Department
10
Geometry
body: collection
of volumes
vertices:
x,y,z location
surfaces: closed
set of curves
volumes: closed
set of surfaces
curves: bounded
by two vertices
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Geometry engineComputational Modeling Sciences Department
12
Geometry
body: collection
of volumes
vertices:
x,y,z location
volumes: closed
set of surfaces
loops: ordered
set of curves on
surface
surfaces: closed
set of curves
(loops)coedges:
orientation of curve
w.r.t. loop
curves: bounded
by two vertices
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Geometry engineComputational Modeling Sciences Department
13
Geometry
body: collection
of volumes
vertices:
x,y,z location
volumes: closed
set of surfaces
(shells)
surfaces: closed
set of curves
(loops)
loops: ordered
set of curves on
surface
coedges:
orientation of curve
w.r.t. loop
shell:
oriented set
of surfaces
comprising
a volume
curves: bounded
by two vertices
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Geometry engineComputational Modeling Sciences Department
15
Geometry
body: collection
of volumes
vertices:
x,y,z location
volumes: closed
set of surfaces
(shells)
surfaces: closed
set of curves
(loops)
loops: ordered
set of curves on
surface
coedges:
orientation of curve
w.r.t. loop
shell:
oriented set
of surfaces
comprising
a volume
coface:
oriented
surface
w.r.t. shell
curves: bounded
by two vertices
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Geometry engineComputational Modeling Sciences Department
16
Geometry
Volume 1
Surface 1 Surface 2 Surface 3 Surface 4 Surface 5 Surface 6
Volume 2
Surface 8 Surface 9 Surface 10 Surface 11
Surface 7
Volume 1
Volume 2
Surface 11
Surface 7
Manifold Geometry:
Each volume maintains
its own set of unique
surfaces
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Geometry engineComputational Modeling Sciences Department
17
Geometry
Volume 1
Surface 1 Surface 2 Surface 3 Surface 4 Surface 5 Surface 6
Volume 2
Surface 8 Surface 9 Surface 10
Surface 7
Volume 1
Volume 2
Surface 7
Non-Manifold
Geometry: Volumes
share matching surfaces
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Mesh generation
Mesh generation works as followsCurves are first discretized,Then surfaces are meshed using curve’sdiscretizations,Finallly, regions are meshed using surfacemeshes.
The mesh generation process’s aim is to insertpoints at the “right” locations i.e. a mesh thatrespects some criterion on element sizes.
C. Geuzaine and J.-F. Remacle · 5
Fig. 4. CAD model of a propeller (left) and its volume mesh (right)
There are various ways to define the mesh size field. In Gmsh, the user canprovide a mesh size field that is defined on another mesh (a background mesh) ofthe domain and/or provide mesh sizes associated with model entities or adapt themesh to the geometry of the model using curvatures. When two size fields !1(x, y, z)and !2(x, y, z) are provided, we use the minimum of both functions as size field.
3.2 1D mesh generation
Let us consider a curve "c(#) : [#1, #2] ! R3. The number of subdivisions N of thecurve is a function of the size field
N =
! !2
!1
1
!(x, y, z)"d!"c"d#.
The N +1 mesh points on the curve are located at coordinates #0, . . . , #N where#i is computed using the following rule
i =
! !i
!1
1
!(x, y, z)"d!"c"d#.
In Gmsh, we compute this primitive using a recursive integration rule.
3.3 2D mesh generation
Curved surface shapes designed by CAD system are usually defined by parametricsurfaces, for example, NURBS [?]. Let us consider a model face G2
i with its un-derlying geometry, in this case a surface S(u, v) # R3. The domain of definitionof parameters (u, v) is defined by a serie of boundary curves. Figure 5 shows oneof the 76 model faces of the propeller. Left part of the figure shows the surface inthe parametric space while the right one is for the real space. This surface con-
ACM Transactions on Mathematical Software, Vol. V, No. N, March 2007.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Mesh generation
The appropriate means to ensure that a mesh-based numerical analysisprocedure produces the most effective solution results is to apply anadaptive solution strategy. Efforts on the development of adaptativestrategies applied to finite element computations have been underwayfor more that twenty years now. Such an adaptive strategy usuallyinvolve some kind of error estimation procedure together with a meshrefinement algorithm.We define the mesh size function δ(x,y,z) as a function the defines atevery point of the domain a target size for the elements at the point.The aim of the mesh generation procedure is to be able to buile a meshthat complies with the mesh size field.There are various ways to define the mesh size field. In Gmsh, the usercan provide a mesh size field that is defined on another mesh (abackground mesh) of the domain and/or provide mesh sizes associatedwith model entities or adapt the mesh to the geometry of the modelusing curvatures. When two size fields δ1(x,y,z) and δ2(x,y,z) areprovided, we use the minimum of both functions as size field.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Mesh Generation
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Mesh Generation
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Mesh Generation
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Mesh Generation
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Mesh Generation
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Mesh Generation
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Mesh generation
Let us consider a curve ~c(ξ) : [ξ1,ξ2]→ R3. The number of subdivisions Nof the curve is a function of the size field
N =
∫ξ2
ξ1
1δ(x,y,z)
‖dξ~c‖dξ.
The N +1 mesh points on the curve are located at coordinates ξ0, . . . ,ξN
where ξi is computed using the following rule
i =
∫ξi
ξ1
1δ(x,y,z)
‖dξ~c‖dξ.
In Gmsh, we compute this primitive using a recursive integration rule.
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
36
Lawson Algorithm
•Locate triangle containing X
•Subdivide triangle
•Recursively check adjoining
triangles to ensure empty-
circle property. Swap
diagonal if needed
•(Lawson,77)
X
Given a Delaunay
Triangulation of n nodes,
How do I insert node n+1 ?
Delaunay
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
37
X
Lawson Algorithm
•Locate triangle containing X
•Subdivide triangle
•Recursively check adjoining
triangles to ensure empty-
circle property. Swap
diagonal if needed
•(Lawson,77)
Delaunay
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
38
Bowyer-Watson Algorithm
•Locate triangle that contains
the point
•Search for all triangles
whose circumcircle contain
the point (d<r)
•Delete the triangles (creating
a void in the mesh)
•Form new triangles from the
new point and the void
boundary
•(Watson,81)
X
r c
d
Given a Delaunay
Triangulation of n nodes,
How do I insert node n+1 ?
Delaunay
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
39
X
Bowyer-Watson Algorithm
•Locate triangle that contains
the point
•Search for all triangles
whose circumcircle contain
the point (d<r)
•Delete the triangles (creating
a void in the mesh)
•Form new triangles from the
new point and the void
boundary
•(Watson,81)
Given a Delaunay
Triangulation of n nodes,
How do I insert node n+1 ?
Delaunay
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
40
•Begin with Bounding Triangles (or Tetrahedra)
Delaunay
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
41
Delaunay
•Insert boundary nodes using Delaunay method
(Lawson or Bowyer-Watson)
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
42
Delaunay
•Insert boundary nodes using Delaunay method
(Lawson or Bowyer-Watson)
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
43
Delaunay
•Insert boundary nodes using Delaunay method
(Lawson or Bowyer-Watson)
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
44
Delaunay
•Insert boundary nodes using Delaunay method
(Lawson or Bowyer-Watson)
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
45
Delaunay
•Insert boundary nodes using Delaunay method
(Lawson or Bowyer-Watson)
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
46
Delaunay
•Recover boundary
•Delete outside triangles
•Insert internal nodes
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
47
Delaunay
Node Insertion
Grid Based
•Nodes introduced based on a regular lattice
•Lattice could be rectangular, triangular, quadtree, etc…
•Outside nodes ignored
h
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
48
Delaunay
Node Insertion
Grid Based
•Nodes introduced based on a regular lattice
•Lattice could be rectangular, triangular, quadtree, etc…
•Outside nodes ignored
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
49
Delaunay
Node Insertion
Centroid
•Nodes introduced at triangle centroids
•Continues until edge length, hl !
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
49
Delaunay
Node Insertion
Centroid
•Nodes introduced at triangle centroids
•Continues until edge length, hl !
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
50
Delaunay
Node Insertion
Centroid
•Nodes introduced at triangle centroids
•Continues until edge length, hl !
l
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
51
Delaunay
Node Insertion
Circumcenter (“Guaranteed Quality”)
•Nodes introduced at triangle circumcenters
•Order of insertion based on minimum angle of any triangle
•Continues until minimum angle > predefined minimum
!
)30( o!"
(Chew,Ruppert,Shewchuk)
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
52
Delaunay
Circumcenter (“Guaranteed Quality”)
•Nodes introduced at triangle circumcenters
•Order of insertion based on minimum angle of any triangle
•Continues until minimum angle > predefined minimum )30( o!"
Node Insertion (Chew,Ruppert,Shewchuk)
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
53
Delaunay
Advancing Front
•“Front” structure maintained throughout
•Nodes introduced at ideal location from current front edge
Node Insertion
A B
C
(Marcum,95)
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
54
Delaunay
Advancing Front
•“Front” structure maintained throughout
•Nodes introduced at ideal location from current front edge
Node Insertion
(Marcum,95)
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
55
Delaunay
Voronoi-Segment
•Nodes introduced at midpoint of segment connecting the
circumcircle centers of two adjacent triangles
Node Insertion
(Rebay,93)
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
56
Delaunay
Voronoi-Segment
•Nodes introduced at midpoint of segment connecting the
circumcircle centers of two adjacent triangles
Node Insertion
(Rebay,93)
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
57
Delaunay
Edges
•Nodes introduced at along existing edges at l=h
•Check to ensure nodes on nearby edges are not too close
Node Insertion
h
h
h
(George,91)
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
58
Delaunay
Edges
•Nodes introduced at along existing edges at l=h
•Check to ensure nodes on nearby edges are not too close
Node Insertion(George,91)
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
59
Delaunay
Boundary Constrained
Boundary Intersection
•Nodes and edges introduced where Delaunay edges
intersect boundary
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
60
Delaunay
Boundary Constrained
Boundary Intersection
•Nodes and edges introduced where Delaunay edges
intersect boundary
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
61
Delaunay
Boundary Constrained
Local Swapping
•Edges swapped between adjacent pairs of triangles until
boundary is maintained
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
62
Delaunay
Boundary Constrained
Local Swapping
•Edges swapped between adjacent pairs of triangles until
boundary is maintained
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
63
Delaunay
Boundary Constrained
Local Swapping
•Edges swapped between adjacent pairs of triangles until
boundary is maintained
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
64
Delaunay
Boundary Constrained
Local Swapping
•Edges swapped between adjacent pairs of triangles until
boundary is maintained
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
65
Delaunay
Boundary Constrained
Local Swapping
•Edges swapped between adjacent pairs of triangles until
boundary is maintained(George,91)(Owen,99)
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generation
Computational Modeling Sciences Department
66
D C
VS
Delaunay
Local Swapping Example
•Recover edge CD at vector Vs
Boundary ConstrainedJean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generation
Computational Modeling Sciences Department
67
D C
E1
E2
E3
E4E5
E6
E7
E8
Local Swapping Example
•Make a list (queue) of all edges Ei, that intersect Vs
Delaunay
Boundary ConstrainedJean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generation
Computational Modeling Sciences Department
68
D CE1
E2
E3
E4E5
E6
E7
E8
Delaunay
Local Swapping Example
•Swap the diagonal of adjacent triangle pairs for each
edge in the list
Boundary ConstrainedJean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generation
Computational Modeling Sciences Department
69
D C
E2
E3
E4E5
E6
E7
E8
Delaunay
Local Swapping Example
•Check that resulting swaps do not cause overlapping
triangles. I they do, then place edge at the back of the
queue and try again later
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generation
Computational Modeling Sciences Department
70
D C
E3
E4E5
E6
E7
E8
Delaunay
Local Swapping Example
•Check that resulting swaps do not cause overlapping
triangles. If they do, then place edge at the back of the
queue and try again later
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generation
Computational Modeling Sciences Department
71
D C
E6
Delaunay
Local Swapping Example
•Final swap will recover the desired edge.
•Resulting triangle quality may be poor if multiple swaps
were necessary
•Does not maintain Delaunay criterion!Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
72
Delaunay
A
C
D E
B
Boundary Constrained
3D Local Swapping
•Requires both boundary edge recovery and boundary
face recovery
Edge Recovery
•Force edges into triangulation by
performing 2-3 swap transformation
ABC = non-conforming face
DE = edge to be recovered
(George,91;99)(Owen,00)
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
73
Delaunay
A
B
C
D E
Boundary Constrained
3D Local Swapping
•Requires both boundary edge recovery and boundary
face recovery
Edge Recovery
•Force edges into triangulation by
performing 2-3 swap transformation
ABC = non-conforming face
DE = edge to be recovered
ABCE
ACBD
2-3 Swap
(George,91;99)(Owen,00)
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
74
Delaunay
A
B
C
D E
Boundary Constrained
3D Local Swapping
•Requires both boundary edge recovery and boundary
face recovery
Edge Recovery
•Force edges into triangulation by
performing 2-3 swap transformation
ABCE
ACBD
2-3 Swap
BAED
CBED
ACED
DE = edge recovered
(George,91;99)(Owen,00)
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
75
Delaunay
A
C
D E
B
Boundary Constrained
3D Local Swapping
•Requires both boundary edge recovery and boundary
face recovery
Edge Recovery
•Force edges into triangulation by
performing 2-3 swap transformationDE = edge recovered
ABCE
ACBD
2-3 Swap
BAED
CBED
ECED
(George,91;99)(Owen,00)
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
76
Delaunay
A B
A BS
S
3D Edge Recovery
•Form queue of faces through which edge AB will pass
•Perform 2-3 swap transformations on all faces in the list
•If overlapping tets result, place back on queue and try again later
•If still cannot recover edge, then insert “steiner” point
Edge AB to be recovered
Exploded view of
tets intersected by
AB
Jean-François Remacle Mesh Generation
Finite Element Mesh Generation
Delaunay-based mesh generationComputational Modeling Sciences Department
77
a
b
c
d e
a
b
c
d e
a
bc
d
e
a
bc
d
e
a
b
c
de
a
b
c
def
n2
a
b
n3
n4
n5
n1
a
b
n2
n3
n4
n5
n1
c
a
b
n1
n2
n3
n4
n5
a
b
n3,i
1
23
n3,j
n3,k
n2,i
n1,i
n1,j
n1,kn2,j
n2,k
Delaunay
2-3 Swap 2-2 Swap Face Split Edge Split Edge Suppress
abce, acbd
abde, bcde, cade
aceb, adcb
adeb, edcb
abce, acbd
abfe, bcfe, cafe
bafd, cbfd, acfd
abnini+1 i=1…N
abnini+1,
cbnini+1 i=1…N
abnini+1 i=1…N
nm,knm.jnm.ia,
nm,knm.jnm.ib m=1…M
N = no. adj. tets at edge ab
M = no. unique trias in
polygon P=n1,n2,n3
Jean-François Remacle Mesh Generation