View
216
Download
0
Embed Size (px)
Citation preview
1
Mesh refinement:sequential, parallel,
and dynamic
Benoît Hudson, CMU
Joint work with Umut Acar, TTI-CGary Miller and Todd Phillips, CMU
Papers available athttp://www.cs.cmu.edu/~bhudson
2
Benoît Hudson, CMU
Joint work with Umut Acar, TTI-CGary Miller and Todd Phillips, CMU
Papers available athttp://www.cs.cmu.edu/~bhudson
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 description2. 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
ConformingAll features
appear (subdivided)
12
Big angles are bad
13
No small angle ) no big angle
14
Need Steiner Points
15
Sizing
Big featuresBig triangles
No-small-angle )Medium size betweensmall, large features
Small featureSmall triangles
Size-optimalityOutput O(mopt) points
16
Formal problem
• Input: – Points 2 Rd, Segments, Polygons, …– Quality bound: angle
• Output:– Conforms: All features appear – Quality: No angle smaller than – Size-optimal: O(mopt) vertices
17
Outline
1. Precise problem description2. Prior solutions
3. Sequential
4. Parallel
5. Dynamic
6. Many open problems
18
Outline
1. Precise problem description
2. Prior solutions3. Sequential
4. Parallel
5. Dynamic
6. Many open problems
19
Delaunay Triangulation
Maximizes minimum
angle
20
Delaunay Triangulation
Maximizes minimum
angle
May not begood 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 criteriaF
eatu
re h
andl
ing
Runtime
2d points
3d points
segments
polygons
n2 n lg nn polylog(n)
Miller04Ruppert92
28
Ruppert 3D: a bad example
29
Ruppert 3D: a bad example
30
Ruppert 3D: (n2)
n/2 pointsaround circle
n/2 pointsalong line
Delaunay hasn2/4 tets
31
32
Evaluation criteriaF
eatu
re h
andl
ing
Runtime
2d points
3d points
segments
polygons
n2 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 criteriaF
eatu
re h
andl
ing
Runtime
2d points
3d points
segments
polygons
n2 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 solutions3. Sequential
4. Parallel
5. Dynamic
6. Many open problems
40
Outline
1. Precise problem description
2. Prior solutions
3. Sequential4. Parallel
5. Dynamic
6. Many open problems
41
Fast sequential meshing
Hudson, Miller, Phillips 2006Sparse Voronoi Refinement
15th International Meshing Roundtable
42
The intuitionQuadtree’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 containsinput, split it.
47
Apply splitting rules
1. If a triangle is skinny,split it.
2. If a triangle containsinput, split it.
48
Split
Split(t)
2. Shrink by k3. Choose a point4. Insert it, retriangulate
1. If a triangle is skinny,split it.
2. If a triangle containsinput, split it.
1. Draw circle
49
Apply splitting rules
1. If a triangle is skinny,split it.
2. If a triangle containsinput, split it.
Split(t)
2. Shrink by k3. Choose a point4. Insert it, retriangulate
1. Draw circle
50
Apply splitting rules
1. If a triangle is skinny,split it.
2. If a triangle containsinput, split it.
51
Apply splitting rules
1. If a triangle is skinny,split it.
2. If a triangle containsinput, split it.
52
Apply splitting rules
1. If a triangle is skinny,split it.
2. If a triangle containsinput, split it.
53
Apply splitting rules
1. If a triangle is skinny,split it.
2. If a triangle containsinput, split it.
54
General flavour
Like quadtree, refinetop-down
Like Ruppert, use inputpoints, circumcenters
Warp to input whenpossible.
55
Runtime proof(1) Quality always “good”
– Never warp close tomesh 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
e0(p)
e1(p)
e1(p)e0(p)
·
61
Quality ) divide & conquer
p
e0(p)
e2(p)
e2(p)e0(p)
· 2
62
Quality ) divide & conquer
p
e0(p)
ei(p)
ei (p)e0(p)
· i
63
Quality ) divide & conquer
p
e0(p)
ei(p)
farthest(p)nearest(p)
· k
64
Quality ) divide & conquer
p
farthest(p)nearest(q)
· 2kq
65
Packing Lemma
p
At most O(1) qi
before farthest(p)falls by half.
q2
q1q3
q5
q4
66
s
Packing Lemma
At most O(1) qi
before farthest(p)falls by half.
farthest(p) falls by half at mostlog (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 criteriaF
eatu
re h
andl
ing
Runtime
2d points
3d points
segments
polygons
n2 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=103, 104) Stanford Bunny (34834 points)
70
In practice: N=1,000
N pointsaround circle
N pointsalong line
AlgorithmSVR
Pyramid
Max #tets70K
1.014M
Max degree70
1,010
Output #tets70K87K
Runtime2s21s
1 GHz Pentium III1 GB RAM
71
(Calculate: (104)2 = 108 tets in Delaunay,each tet is 8 pointers ~ 3.2 GB)
In practice: N=10,000
N pointsaround circle
N pointsalong line
SVR: outputs 722K tets in 22sPyramid: thrashes, ^c after 4 hours
72
In practice: the bunnyAlgorithm
SVRPyramid
Output #tets430K383K
Runtime12s25s
73
Outline
1. Precise problem description
2. Prior solutions
3. Sequential4. Parallel
5. Dynamic
6. Many open problems
74
Outline
1. Precise problem description
2. Prior solutions
3. Sequential
4. Parallel5. Dynamic
6. Many open problems
75
Parallel SVR
Hudson, Miller, Phillips 2007Sparse 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]Ruppert [STU02]
any d2d2d3d
O(lg (L/s) lg(m))O(lg n)O(polylog(L/s))O(polylog(L/s))
n: number of input points, segments, …m: number of output pointsL/s: spread of the input
O(n lg L/s + m)O(n lg n + m)O(m polylog(L/s))(n2)
Depth WorkDimensionAlgorithm
L: largest distances: smallest distance
L/s spreadNormally: L/s poly(n)
lg L/s lg n
78
Outline
1. Precise problem description
2. Prior solutions
3. Sequential
4. Parallel5. Dynamic
6. Many open problems
79
Outline
1. Precise problem description
2. Prior solutions
3. Sequential
4. Parallel
5. Dynamic6. Many open problems
80
Dynamic meshing
Acar, Hudson, 2007 (in submission)Dynamic mesh refinement using
Quadtrees and Off-centers
81O’Brien, Hodgins 1999
QuickTime™ and a decompressor
are needed to see this picture.
82
Stability
83
Stability
84
Stability
85
Stability
86
Stability
87
Stability bound: O(log L/s)
Proof in paper:Newly split cells packaround 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. Dynamic6. 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 algorithmdoes 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