1 Mesh refinement: sequential, parallel, and dynamic Benoît Hudson, CMU Joint work with Umut Acar, TTI-C Gary Miller and Todd Phillips, CMU Papers available at
2 Benoît Hudson, CMU Joint work with Umut Acar, TTI-C Gary Miller and Todd Phillips, CMU Papers available at Mesh refinement: sequential, parallel, and dynamic
3
4
5 Visualize Finite Element Simulation Overview Model Partial Diff. Eqs. Mesh Solve
6 Our results First optimal-time sequential mesher –Fast in implementation First provably fast parallel mesher First optimal-time dynamic mesher
7 Outline 1.Precise problem description 2.Prior solutions 3.Sequential 4.Parallel 5.Dynamic 6.Many open problems
8 Outline 1.Precise problem description 2.Prior solutions 3.Sequential 4.Parallel 5.Dynamic 6.Many open problems
9 Input Points Segments Polygons
10 Input Points Segments Polygons ‘P’ courtesy of Shewchuk
11 Output ‘P’ courtesy of Shewchuk Conforming All features appear (subdivided)
12 Big angles are bad
13 No small angle ) no big angle
14 Need Steiner Points
15 Sizing Big features Big triangles No-small-angle ) Medium size between small, large features Small feature Small triangles Size-optimality Output O(m opt ) points
16 Formal problem Input: –Points 2 R d, Segments, Polygons, … –Quality bound: angle Output: –Conforms: All features appear –Quality: No angle smaller than –Size-optimal: O(m opt ) vertices
17 Outline 1.Precise problem description 2.Prior solutions 3.Sequential 4.Parallel 5.Dynamic 6.Many open problems
18 Outline 1.Precise problem description 2.Prior solutions 3.Sequential 4.Parallel 5.Dynamic 6.Many open problems
19 Delaunay Triangulation Maximizes minimum angle
20 Delaunay Triangulation Maximizes minimum angle May not be good enough
21 Ruppert (1992)
22 Ruppert: Identify skinny triangle
23 Ruppert: Find circumcenter
24 Ruppert: Snap to segment
25 Ruppert: Insert, retriangulate
26 Ruppert: Repeat until done
27 Evaluation criteria Feature handling Runtime 2d points 3d points segments polygons n2n2 n lg nn polylog(n) Miller04Ruppert92
28 Ruppert 3D: a bad example
29 Ruppert 3D: a bad example
30 Ruppert 3D: (n 2 ) n/2 points around circle n/2 points along line Delaunay has n 2 /4 tets
31
32 Evaluation criteria Feature handling Runtime 2d points 3d points segments polygons n2n2 n lg nn polylog(n) Mil04 Shewchuk98
33 Quadtree: Bern et al (1990)
34 Quadtree: Bern et al (1990)
35 Quadtree: Bern et al (1990)
36 Quadtree: Bern et al (1990)
37 Evaluation criteria Feature handling Runtime 2d points 3d points segments polygons n2n2 n lg nn polylog(n) Mil04 She98 BEG90 MV92
38 Compare and contrast 55 triangles, 30 86 triangles, 17
39 Outline 1.Precise problem description 2.Prior solutions 3.Sequential 4.Parallel 5.Dynamic 6.Many open problems
40 Outline 1.Precise problem description 2.Prior solutions 3.Sequential 4.Parallel 5.Dynamic 6.Many open problems
41 Fast sequential meshing Hudson, Miller, Phillips 2006 Sparse Voronoi Refinement 15th International Meshing Roundtable
42 The intuition Quadtree’s fast runtime: top-down. Intermediate meshes are good quality. Ruppert’s small size: bottom-up, good feature recovery. SVR: always good quality, find features quickly
43 Sparse Delaunay Refinement
44 Add a bounding box
45 Triangulate just the box!
46 Apply splitting rules 1.If a triangle is skinny, split it. 2.If a triangle contains input, split it.
47 Apply splitting rules 1.If a triangle is skinny, split it. 2.If a triangle contains input, split it.
48 Split Split(t) 2. Shrink by k 3. Choose a point 4. Insert it, retriangulate 1.If a triangle is skinny, split it. 2.If a triangle contains input, split it. 1. Draw circle
49 Apply splitting rules 1.If a triangle is skinny, split it. 2.If a triangle contains input, split it. Split(t) 2. Shrink by k 3. Choose a point 4. Insert it, retriangulate 1. Draw circle
50 Apply splitting rules 1.If a triangle is skinny, split it. 2.If a triangle contains input, split it.
51 Apply splitting rules 1.If a triangle is skinny, split it. 2.If a triangle contains input, split it.
52 Apply splitting rules 1.If a triangle is skinny, split it. 2.If a triangle contains input, split it.
53 Apply splitting rules 1.If a triangle is skinny, split it. 2.If a triangle contains input, split it.
54 General flavour Like quadtree, refine top-down Like Ruppert, use input points, circumcenters Warp to input when possible.
55 Runtime proof (1) Quality always “good” –Never warp close to mesh vertex –No angle smaller than ® ’
56 Runtime proof (1) Quality always good (2) Quality ) bounded degree –360 degrees –degree 360/ ® ’
57 Runtime proof (1) Quality always good (2) Quality ) bounded degree (3) Bounded degree ) O(1) operations –insertions –range queries
58 Runtime proof (1) Quality always good (2) Quality ) bounded degree (3) Bounded degree ) O(1) operations (4) Quality ) divide & conquer –!!!
59 Quality ) divide & conquer p
60 Quality ) divide & conquer p e 0 (p) e 1 (p) e 0 (p) · ·
61 Quality ) divide & conquer p e 0 (p) e 2 (p) e 0 (p) · 2· 2
62 Quality ) divide & conquer p e 0 (p) e i (p) e 0 (p) · i· i
63 Quality ) divide & conquer p e 0 (p) e i (p) farthest(p) nearest(p) · k· k
64 Quality ) divide & conquer p farthest(p) nearest(q) · 2k q
65 Packing Lemma p At most O(1) q i before farthest(p) falls by half. q2q2 q1q1 q3q3 q5q5 q4q4
66 s Packing Lemma At most O(1) q i before farthest(p) falls by half. farthest(p) falls by half at most log (L/s) times L
67 Runtime proof (1) Quality always good (2) Quality ) bounded degree (3) Bounded degree ) O(1) operations (4) Quality ) divide & conquer O(m + n log L/s)
68 Evaluation criteria Feature handling Runtime 2d points 3d points segments polygons n2n2 n lg nn polylog(n) Mil04 She98 BEG90 MV92 SVR (HMP06)
69 In practice: point clouds N points around ring N points on line Preparata (N=10 3, 10 4 ) Stanford Bunny (34834 points)
70 In practice: N=1,000 N points around circle N points along line Algorithm SVR Pyramid Max #tets 70K 1.014M Max degree 70 1,010 Output #tets 70K 87K Runtime 2s 21s 1 GHz Pentium III 1 GB RAM
71 (Calculate: (10 4 ) 2 = 10 8 tets in Delaunay, each tet is 8 pointers ~ 3.2 GB) In practice: N=10,000 N points around circle N points along line SVR: outputs 722K tets in 22s Pyramid: thrashes, ^c after 4 hours
72 In practice: the bunny Algorithm SVR Pyramid Output #tets 430K 383K Runtime 12s 25s
73 Outline 1.Precise problem description 2.Prior solutions 3.Sequential 4.Parallel 5.Dynamic 6.Many open problems
74 Outline 1.Precise problem description 2.Prior solutions 3.Sequential 4.Parallel 5.Dynamic 6.Many open problems
75 Parallel SVR Hudson, Miller, Phillips 2007 Sparse Parallel Delaunay Refinement To appear, SPAA.
76 Why parallel? My laptop: two cores today –Paterson: expect 100 cores in 10 years National Labs: 41,000 cores last week Understanding the dependencies: –Helps with constant factors in sequential case –Helps with out-of-core, distributed, compression, dynamic case, …
77 Parallel Algorithms Comparison SVR [HMP07] Quadtree [BET93] Ruppert [STU02] any d 2d 3d O(lg (L/s) lg(m)) O(lg n) O(polylog(L/s)) n: number of input points, segments, … m: number of output points L/s: spread of the input O(n lg L/s + m) O(n lg n + m) O(m polylog(L/s)) (n 2 ) DepthWorkDimensionAlgorithm L: largest distance s: smallest distance L/s spread Normally: L/s poly(n) lg L/s lg n
78 Outline 1.Precise problem description 2.Prior solutions 3.Sequential 4.Parallel 5.Dynamic 6.Many open problems
79 Outline 1.Precise problem description 2.Prior solutions 3.Sequential 4.Parallel 5.Dynamic 6.Many open problems
80 Dynamic meshing Acar, Hudson, 2007 (in submission) Dynamic mesh refinement using Quadtrees and Off-centers
81 O’Brien, Hodgins 1999
82 Stability
83 Stability
84 Stability
85 Stability
86 Stability
87 Stability bound: O(log L/s) Proof in paper: Newly split cells pack around new point
88 Self-adjusting computation: Acar et al, 2006 Update speed = O(# stability) Insert / delete are exactly symmetric Stability is O(log L/s) ) Quadtree update is O(log L/s) Implementation in SML
89 Outline 1.Precise problem description 2.Prior solutions 3.Sequential 4.Parallel 5.Dynamic 6.Many open problems
90 Outline 1.Precise problem description 2.Prior solutions 3.Sequential 4.Parallel 5.Dynamic 6.Many open problems
91 Visualize (1) Dynamic Simulation Model Partial Diff. Eqs. Mesh Solve
92 Visualize (1) Dynamic Simulation Model Partial Diff. Eqs. Mesh Solve
93 Visualize (1) Dynamic Simulation Model Partial Diff. Eqs. Mesh Solve
94 Visualize (1) Dynamic Simulation Model Partial Diff. Eqs. Mesh Solve New requirements: (1)Dynamic matrix assembly (2)Dynamic linear solver (3)Dynamic visualizer (4)Dynamic AMR
95 (2) Dynamic with Features Dynamic algorithm does not handle segments, polygons,... Dynamic SVR? –Likely coming soon
96 (3) Out of core refinement Engineers want billions of elements Doesn’t fit in memory Dynamic refinement allows partial meshing
97 (4) Distributed refinement Engineers want billions of elements Engineers have supercomputers Need to address: –Mesh partitioning –Load balancing
98 (5) Surface reconstruction Traditional approach: Compute Delaunay Skinny tet ) surface Refinement: Compute Delaunay Skinny tet ) refine
99 Summary Everyone needs a mesher Sequential: First optimal-time mesher –First sub-quadratic in 3d! –Implementation in progress Parallel: First optimal-work, shallow-depth Dynamic: First optimal-time mesher
100 Bibliography [Che89]: Chew “Guaranteed quality triangular meshes”, 1989 [BEG90]: Bern, Eppstein, Gilbert “Provably good mesh generation”, 1994 [MV92]: Mitchell, Vavasis “Quality mesh generation …”, 2000 [Rup92]: Ruppert “A Delaunay refinement algorithm for …”, 1995 [BET93]: Bern, Eppstein, Teng “Parallel construction …”, 1999 [She97]: Shewchuk “Delaunay refinement mesh generation”, 1997 [MPW02]: Miller, Pav, Walkington “Fully incremental …”, 2002 [STU02]: Spielman, Teng, Ungor “Parallel Delaunay …”, 2002 [Mil04]: Miller, “A time-efficient Delaunay Refinement …”, 2004 [HPU05]: Har-Peled, Ungor, “A time-optimal Delaunay …”, 2005 [HMP06]: Hudson, Miller, Phillips, “Sparse Voronoi Refinement”, 2006 [HMP07]: ~, “Sparse Parallel Delaunay Refinement”, 2007 [MPS07]: Miller, Phillips, Sheehy, “Size competitive …”, 2007 [HA07]: Acar, Hudson, “Dynamic quad-tree mesh refinement...”, submitted