Title: New results on mesh refinement
1New results onmesh refinement
- Benoît Hudson, CMU
- Joint work with Gary Miller and Todd Phillips
Papers available at http//www.cs.cmu.edu/bhudson
2CAD model
3Will it work?
4Equations
Navier-Stokes
Heat transfer
5 Run simulations!
Partial Diff. Eqs.
CAD model
6Input
Points
Segments
Polygons
7Input
Points
Segments
Polygons
P courtesy of Shewchuk
8Output
P courtesy of Shewchuk
9Simpler Input
10Two possible meshes
11Which is better?
Example f(x,y) 1-x2
12This is a bad mesh
f(x,y) 1-x2
- At mesh vertices
- read the value
- At other points p
- Find t that contains p
- Weighted average of points of t
13This is a better mesh
0
0
1
0
0
1
0
0
1
0
0
14Good aspect ratio Þ good interpolation
R
Good aspect ratio if
r
Equivalent all angles ³ a
15Aspect ratio
Bad aspect ratio if
R
r
Equivalent some angle
16This is a better mesh
0
0
1
This mesh is Delaunay best possible for those
points
0
0
1
0
0
1
0
0
17This is a good mesh
Add Steiner points
18This is a good mesh
0
0
0
0
19Formal problem
- Input
- Piecewise Linear Complex (PLC)
- points, segments, polygons,
- quality bound angle ³ a
- Output
- quality triangulation (angle ³ a)
- all features appear (perhaps subdivided)
- O(mopt) vertices
20Grading
Good aspect ratio Þ good grading
21Outline
- Two older methods
- quadtree refinement
- Delaunay refinement
- Our algorithm SVR as a hybrid
- Parallel SVR
Dynamic meshing too much for this talk. See me
afterwards.
22Older Solutions
- 1950-now construct mesh by hand!
- Takes days to months.
- Automatic methods ca. 1980-now
- no quality, size, or time bounds
- BEG90 quality and size in O(n lg n m)
- (buggy proof, fixed in BET93)
- Rup92 smaller in practice, no time bound.
23Simpler input
Just points for now
24Quadtree refinement
BEG90, MV92, BET93
Þ
25Quadtree rules
- Unbalanced
- Neighbor is small
- Crowded
- two points in cell, or
- one point in cell, one in neighbour
26Quadtree
27Quadtree
28Quadtree
29Quadtree in a word
- Quality mesh (17)
- O(mopt) output size
- O(n lg n m) runtime
- General approach top-down
(think binary search tree)
30Delaunay Refinement
Rup92, She97
31Add a bounding box
32Triangulate (use Delaunay)
33Identify skinny triangle
34Find circumcenter
35Insert, retriangulate
36Find more skinny triangles
37Find more skinny triangles
38Find more skinny triangles
39Find more skinny triangles
40Find more skinny triangles
41Find more skinny triangles
42Rupperts algorithm in a word
- Quality mesh (any a 20.7)
- O(mopt) output size
- O(n2 m) runtime worst case
- works fast in practice
- General approach bottom-up
43Compare and contrast
69 triangles, 17
35 triangles, 30
44Rupperts algorithm in a word
- Quality mesh
- O(mopt) output size
- smaller than quadtree in practice
- O(n2 m) runtime worst case
- works fast in practice
- General approach bottom-up
45Restrictions
- Rupperts algorithm handles segments only at 60
angles to each other. - 3d extensions She97, MPW02
segment segment face
segment face face
60 70 90
Smaller angles may cause infinite loops
46Meshing well, quickly
- Hudson, Miller, Phillips 2006Sparse Voronoi
Refinement15th International Meshing Roundtable
47The Goal
Rupperts small meshes
Quadtrees fast runtime
In dimension 3!
48The intuition
Quadtrees fast time slowly zero in on
small features, keep mesh good quality always.
Large size warp to input too late.
SVR always good quality, resolve when necessary
Rupperts small size immediately resolve
all features. Rupperts bad timing allow
horrid mesh quality.
49SVR
50Add a bounding box
51Triangulate just the box!
Triangles keep track of points
52Apply splitting rules
- If a triangle is skinny,split it.
- If a triangle containsinput, split it.
53Apply splitting rules
- If a triangle is skinny,split it.
- If a triangle containsinput, split it.
54Split
- If a triangle is skinny,split it.
- If a triangle containsinput, split it.
Split(t)
1. Draw circle
2. Shrink by k
3. Choose a point
4. Insert it, retriangulate
55Apply splitting rules
- If a triangle is skinny,split it.
- If a triangle containsinput, split it.
Split(t)
1. Draw circle
2. Shrink by k
3. Choose a point
4. Insert it, retriangulate
56Apply splitting rules
- If a triangle is skinny,split it.
- If a triangle containsinput, split it.
57Apply splitting rules
- If a triangle is skinny,split it.
- If a triangle containsinput, split it.
58General flavour
Like quadtree, refine top-down Like Ruppert, use
input points and circumcenters
59SVR in a word
L largest distance s smallest distance L/s º
spread Normally L/s ÃŽ poly(n) lg L/s lg n
- Quality mesh
- O(mopt) output size
- O(n lg L/s m) runtime worst case
- General approach hybrid
60Overall Comparison
SVR HMP06 Quadtree BEG90 Ruppert
Rup92 Octtree MV92 Shewchuk She97
any d 2d 2d 3d 3d
O(n lg L/s m) O(n lg n m) O(mn) O(mn) W(n2)
, O(m2n)
hybrid top-down bottom-up top-down bottom-up
n number of input points, segments, m number
of output points L/s spread of the input lg n
assumes L/s ÃŽ poly(n)
Miller04 O((n lg G m) lg m)
HPU05O(n lg L/s m) on point sets
61Overall Comparison
O(n lg n m) on point sets
SVR HMP06 Quadtree BEG90 Ruppert
Rup92 Octtree MV92 Shewchuk She97
any d 2d 2d 3d 3d
O(n lg L/s m) O(n lg n m) O(mn) O(mn) W(n2)
, O(m2n)
hybrid top-down bottom-up top-down bottom-up
W(n2) even on point sets
n number of input points, segments, m number
of output points L/s spread of the input lg n
assumes L/s ÃŽ poly(n)
62In practice
n/2 points along line
n/2 points around circle
Delaunay has n2/4 tets
63In practice n2000
Algorithm SVR Shewchuk
Max tets 81K 1.014M
Max degree 39 1,000
Output tets 81K 87K
n/2 points along line
n/2 points around circle
64In practice n20000
(Calculate Pyramid needs 108 tets, each tet is 8
pointers Þ 3.2 GB)
SVR outputs 774K tets in 8 minutes Shewchuk
thrashes, c after 4 hours
n/2 points along line
n/2 points around circle
65Parallel SVR
- Hudson, Miller, Phillips 2007Sparse Parallel
Delaunay RefinementTo appear, SPAA.
66Why parallel?
- Low-end desktops have dual-core CPUs.
- Understanding the dependencies
- Helps with constant factors in sequential case
- Helps with out-of-core, distributed, compression,
dynamic case,
67Parallel Comparison
Depth
Work
SVR HMP07 Quadtree BET93 Ruppert STU02
any d 2d 2d, 3d
O(lg (L/s) lg(m)) O(lg n) O(polylog(L/s))
O(n lg L/s m) O(n lg n m) O( ??? )
n number of input points, segments, m number
of output points L/s spread of the input lg n
assumes L/s ÃŽ poly(n)
68A sample work set
What can we do in parallel?
69Conflict
70Block
71Moot
72Independent events
73The algorithm parallel
- Build a bounding box
- While workset not empty
- Compute conflicts, blocking, mooting
- Defer blocked moves to later
- Colour the conflict graph in colours 1..d
- for 1..d
- perform all the moves in parallel
- remove mooted moves
- collect new moves for next round
74Why does it work?
- No move is blocked more than O(1) rounds
- either it happens
- or it gets mooted
- Proof
- If a break move blocks, there is a clean move
nearby. - Clean moves dont block.
- By packing, only O(1) clean moves can be nearby.
- QED.
75Summary
- No move is blocked long
- Break moves are discovered quickly
- Thus the time bound of O(lg L/s) rounds
- And O(lg m) per round overhead
- In practice we can use any number of
shared-memory processors
76Conclusions SVR
- O(n lg (L/s) m) time
- Matches best 2d bound
- First sub-quadratic 3d time bound
- First 4d mesh refinement algorithm
- Practical
- Parallelizes!
77Open problems
78(1) Constrained Delaunay Refinement
- SVR meshes tiny gap.
- Gap is exterior how can we ignore it?
- Traditional method Constrained Delaunay
Triangulation. - Hope CDT/SVR
79(2) Slivers
- Points almost coplanar
- Good radius/edge ratio
- Bad solid anglesÞ numerically bad
- Best proofs guarantee 0.001
- In practice get 10
80(3) Small(ish) angles
- SVR needs ³ 90 angles between faces
- 80? 60? 30?
81(4) Small angles
- What if angle is 1?
- Whats a legal output?
- MPS07 guarantee no large angles in 2d
- Extends to 3d?
82(5) Curves
- CAD models use curves, curved surfaces
- No good theoretical bounds on refining curved
surfaces
83(6) Laundry list
- Dynamic meshing
- (my thesis topic)
- Moving meshes
- Streaming
- Distributed-memory
- CAD cleaning
- Handling large spread
- Non-Euclidian metrics
- Better constant bounds
84Bibliography
- 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 , submitted - HA07 Hudson, Acar, Dynamic quad-tree mesh
refinement, submitted