Lecture Notes on Delaunay Mesh Generation
Total Page:16
File Type:pdf, Size:1020Kb
Lecture Notes on Delaunay Mesh Generation Jonathan Richard Shewchuk February 5, 2012 Department of Electrical Engineering and Computer Sciences University of California at Berkeley Berkeley, CA 94720 Copyright 1997, 2012 Jonathan Richard Shewchuk Supported in part by the National Science Foundation under Awards CMS-9318163, ACI-9875170, CMS-9980063, CCR-0204377, CCF-0430065, CCF-0635381, and IIS-0915462, in part by the University of California Lab Fees Research Program, in part bythe Advanced Research Projects Agency and Rome Laboratory, Air Force Materiel Command, USAF under agreement number F30602- 96-1-0287, in part by the Natural Sciences and Engineering Research Council of Canada under a 1967 Science and Engineering Scholarship, in part by gifts from the Okawa Foundation and the Intel Corporation, and in part by an Alfred P. Sloan Research Fellowship. Keywords: mesh generation, Delaunay refinement, Delaunay triangulation, computational geometry Contents 1Introduction 1 1.1 Meshes and the Goals of Mesh Generation . ............ 3 1.1.1 Domain Conformity . .... 4 1.1.2 ElementQuality ................................ .... 5 1.2 A Brief History of Mesh Generation . ........... 7 1.3 Simplices, Complexes, and Polyhedra . ............. 12 1.4 Metric Space Topology . ........ 15 1.5 HowtoMeasureanElement ........................... ....... 17 1.6 Maps and Homeomorphisms . ....... 21 1.7 Manifolds....................................... ..... 22 2Two-DimensionalDelaunayTriangulations 25 2.1 Triangulations of a Planar Point Set . ............. 26 2.2 The Delaunay Triangulation . .......... 26 2.3 The Parabolic Lifting Map . ......... 28 2.4 TheDelaunayLemma................................ ...... 30 2.5 The Flip Algorithm . ....... 32 2.6 The Optimality of the Delaunay Triangulation . ................ 34 2.7 The Uniqueness of the Delaunay Triangulation . ............... 35 2.8 Constrained Delaunay Triangulations in the Plane . .................. 36 2.8.1 Piecewise Linear Complexes and their Triangulations ................. 37 2.8.2 The Constrained Delaunay Triangulation . ............ 40 2.8.3 Properties of the Constrained Delaunay Triangulation. 41 3AlgorithmsforConstructingDelaunayTriangulations 43 3.1 The Orientation and Incircle Predicates . ............... 44 3.2 A Dictionary Data Structure for Triangulations . ................. 46 3.3 Inserting a Vertex into a Delaunay Triangulation . .................. 47 3.4 Inserting a Vertex Outside a Delaunay Triangulation . ................... 49 3.5 The Running Time of Vertex Insertion . ............ 50 3.6 Inserting a Vertex into a Constrained Delaunay Triangulation................. 52 3.7 The Gift-Wrapping Step . ........ 53 3.8 The Gift-Wrapping Algorithm . .......... 55 3.9 Inserting a Segment into a Constrained Delaunay Triangulation . 56 i 4Three-DimensionalDelaunayTriangulations 59 4.1 Triangulations of a Point Set in Ed ............................... 60 4.2 The Delaunay Triangulation in Ed ............................... 60 4.3 Properties of Delaunay Triangulations in Ed .......................... 62 4.4 The Optimality of the Delaunay Triangulation in Ed ...................... 62 4.5 Three-Dimensional Constrained Delaunay Triangulations . 64 4.5.1 Piecewise Linear Complexes and their Triangulations in Ed ............. 65 4.5.2 The Constrained Delaunay Triangulation in E3 .................... 67 4.5.3 The CDT Theorem . .. 68 4.5.4 Properties of the Constrained Delaunay TriangulationinE3 ............. 69 5AlgorithmsforConstructingDelaunayTriangulationsinE3 71 5.1 A Dictionary Data Structure for Tetrahedralizations . .................... 72 5.2 Delaunay Vertex Insertion in E3 ................................ 72 5.3 The Running Time of Vertex Insertion in E3 .......................... 73 5.4 Biased Randomized Insertion Orders . ............. 74 5.5 Point Location by Walking . ......... 75 5.6 The Gift-Wrapping Algorithm in E3 .............................. 76 5.7 Inserting a Vertex into a Constrained Delaunay Triangulation in E3 .............. 77 6Two-DimensionalDelaunayRefinementAlgorithmsforQuality Mesh Generation 79 6.1 The Key Idea Behind Delaunay Refinement . ........... 80 6.2 Chew’s First Delaunay Refinement Algorithm . .............. 81 6.3 Ruppert’s Delaunay Refinement Algorithm . ............. 83 6.3.1 Description of the Algorithm . ......... 85 6.3.2 Local Feature Sizes of Planar Straight Line Graphs . ............... 88 6.3.3 Proof of Termination . ...... 89 6.3.4 Proof of Good Grading and Size-Optimality . ............ 94 6.4 Chew’s Second Delaunay Refinement Algorithm . ............. 97 6.4.1 Description of the Algorithm . ......... 97 6.4.2 Proof of Termination . ...... 98 6.4.3 Proof of Good Grading and Size Optimality . ...........100 7Three-DimensionalDelaunayRefinementAlgorithms 103 7.1 Definitions...................................... ......105 7.2 A Three-Dimensional Delaunay Refinement Algorithm . ................105 7.2.1 Description of the Algorithm . .........106 7.2.2 Local Feature Sizes of Piecewise Linear Complexes . ..............114 7.2.3 Proof of Termination . ......116 7.2.4 Proof of Good Grading . .....120 7.3 Sliver Removal by Delaunay Refinement . ............124 Bibliography 127 Chapter 1 Introduction One of the central tools of scientific computing is the fifty-year old finite element method—a numerical method for approximating solutions to partial differential equations. The finite element method and its cousins, the finite volume method and the boundary element method, simulate physical phenomena includ- ing fluid flow, heat transfer, mechanical deformation, and electromagnetic wave propagation. They are applied heavily in industry and science for marvelously diverse purposes—evaluating pumping strategies for petroleum extraction, modeling the fabrication and operation of transistors and integrated circuits, opti- mizing the aerodynamics of aircraft and car bodies, and studying phenomena from quantum mechanics to earthquakes to black holes. The aerospace engineer Joe F. Thompson, who commanded a multi-institutional mesh generation effort called the National Grid Project [124], wrote in 1992 that An essential element of the numerical solution of partial differential equations (PDEs) on gen- eral regions is the construction of a grid (mesh) on which to represent the equations in finite form. [A]t present it can take orders of magnitude more man-hours to construct the grid than it does to perform and analyze the PDE solution on the grid. This is especially true now that PDE codes of wide applicability are becoming available, and grid generation has been cited repeatedly as being a major pacing item. The PDE codes now available typically require much less esoteric expertise of the knowledgeable user than do thegridgenerationcodes. Two decades later, meshes are still a recurring bottleneck. The automatic mesh generation problem is to divide a physical domain with a complicated geometry—say, anautomobileengine,ahuman’sbloodvessels, or the air around an airplane—into small, simple pieces called elements,suchastrianglesorrectangles (for two-dimensional geometries) or tetrahedra or rectangular prisms (for three-dimensional geometries), as illustrated in Figure 1.1. Millions or billions of elements may be needed. Ameshmustsatisfynearlycontradictoryrequirements:itmust conform to the shape of the object or simulation domain; its elements may be neither too large nor too numerous; it may have to grade from small to large elements over a relatively short distance; and it must be composed of elements that are of the right shapes and sizes. “The right shapes” typically include elements that are nearly equilateral and equiangular, and typically exclude elements that are long and thin, e.g. shaped like a needle or a kite. However, some applications require anisotropic elements that are long and thin, albeit with specified orientations and eccen- tricities, to interpolate fields with anisotropic second derivatives or to model anisotropic physical phenomena such as laminar air flow over an airplane wing. 1 2 Jonathan Richard Shewchuk Figure 1.1: Finite element meshes of a polygonal, a polyhedral, and a curved domain. One mesh of the key has poorly shaped triangles and no Steiner points; the other has Steiner points and all angles between 30◦ and 120◦. The cutaway view at lower right reveals some of the tetrahedral elements inside a mesh. By my reckoning, the history of mesh generation falls into three periods, conveniently divided by decade. The pioneering work was done by researchers from several branches of engineering, especially mechanics and fluid dynamics, during the 1980s—though as we shall see, the earliest work dates back to at least 1970. This period brought forth most of the techniques used today: the Delaunay, octree, and advancing front methods for mesh generation, and mesh “clean-up” methods forimprovinganexistingmesh.Unfortunately, nearly all the algorithms developed during this period are fragile, and produce unsatisfying meshes when confronted by complex domain geometries and stringent demands on element shape. Around 1988, these problems attracted the interest of researchers in computational geometry, a branch of theoretical computer science. Whereas most engineers were satisfied with mesh generators that usually work for their chosen domains, computational geometers set aloftiergoal:provably good mesh generation, the design of algorithms that are mathematically guaranteedtoproduceasatisfyingmesh,evenfordomain geometries unimagined by the algorithm designer. This