Optimal-time Dynamic Mesh Refinement

Download Report

Transcript Optimal-time Dynamic Mesh Refinement

Optimal-time
Dynamic
Mesh
Refinement
Benoît Hudson, CMU
Joint work with Umut Acar, TTI-C
www.cs.cmu.edu/bhudson
credit: SCEC
The mesh
credit: CMU quake project
• Fine elements
to resolve
fine features:
– topography
– surface effects
• Coarse elements
for coarse
features
– deep underground
– hard rock
Drives
Formal
Simulation
• Input:
Accuracy
problem: Meshing
Drives
– Point set 2 Rd
Simulation
– Fixed quality bound: angle Runtime
a
• Output: Triangulation that is:
– Conforming: All input points appear
– Quality: No angle smaller than a
– Optimal size: Not too many elements
Mesh size near
Riverside:
how big?
Adaptive Mesh Refinement
• Adapt the mesh during the
simulation
• Refine steep gradients
• Coarsen flat gradients
• Use dynamic mesh refinement!
Formal problem: Meshing
• Input:
– Point set 2 Rd
– Fixed quality bound: angle  a
• Output: Triangulation that is:
– Conforming: All input points appear
– Quality: No angle smaller than a
– Optimal size: Not too many elements
Additions Formal problem:
Deletions Dynamic Meshing
• Input:
– Dynamic point set 2 Rd
– Fixed quality bound: angle  a
• Maintain: Triangulation that is:
– Conforming: All input points appear
– Quality: No angle smaller than a
– Optimal size: Not too many elements
Outline
1.
Precise problem description
2. Static meshing using quadtrees
3.
4.
5.
Dynamic
Applications
Generating tiny meshes in 2-d
Quadtree refinement
[BEG90, MV92, BET93]

Quadtree [BEG90] rules
Crowded
• two points
in cell, or
• one point in
cell, one in
neighbour
Unbalanced
• Neighbor is small
My rule:
Order the work
largest first.
Quadtree: Build Overlay
Quadtree: Warp
Quadtree: Triangulate
Guarantees
•
•
•
•
Conforming: All input points appear
Quality: No angle smaller than a
Optimal size: Not too many elements
Fast: O(n lg L/s) time
– in any fixed dimension d
L (longest)
Sizes of cells:
L
L/2
O(lg(L/s))
...
s/4
{
Runtime: O(n lg L/s)
• Want to show: O(n lg L/s) splits performed.
– Namely, O(lg L/s) splits per input point
• ... ?
Runtime: O(n lg L/s)
• Want to show: O(n lg L/s) splits performed.
– Namely, O(lg L/s) splits per input point
• Account separately for splits due to:
– Crowding
– Balance
Runtime: # crowded cells
Crowded cells
blamed on p if:
- Cell contains p
- Cell neighbours p
- Max 9 neighbours
of each size.
p
Runtime: # unbalanced cells
Unbalanced cells
blamed on p if:
- Cell unbalanced by
cell blamed on p
How to count these?
p
Runtime: # unbalanced cells
• Unbalanced cell
blamed on p with
size k ?
) Distance · 4 k
Blamed on p
Size |c|
Distance |c|
Blamed3 on p
Unbalanced
Size 42 |c|
Distance · |c| + 4 |c|
+ 42 |c|
Blamed2 on p
Unbalanced
Size 4 |c|
Distance · |c| + 4 |c|
Packing Lemma
O(1) objects
of size k fit in
distance O(k)
4k
[Worst case: 42]
Runtime: O(n lg L/s)
• For each point p,
– For each size i
• 16 unbalanced splits
• 9 crowded splits
n points
lg(L/s)+2 sizes
25 splits each
25n [lg(L/s) + 2]
Guarantees: BEG90
•
•
•
•
Conforming: All input points appear
Quality: No angle smaller than a
Optimal size: Not too many elements
Fast: O(n lg L/s) time
– in any fixed dimension d
Outline
1.
2.
Precise problem description
Static meshing using quadtrees
3. Dynamic meshing
4.
5.
Applications
Generating tiny meshes in 2-d
Dynamic Trace
main
init
split
split
split
Dynamic Trace
main
init
split
split
split
warp
Dynamic Trace
main
init
split
split
split
warp
warp
Dynamic Trace
main
init
split
split
split
warp triang
warp
triang
Comparing traces
main
init
split
split
split
main
init
split
Trace stability:
How much red?
split
split
split
split
split
split
Self-adjusting computation:
Acar et al, 2006
• Update speed = O(# stability)
) Quadtree update is O(log L/s)
• History-independent:
– Retain guarantees from static algorithm
• Insert / delete are exactly symmetric
• Implementation in SML
Outline
1.
2.
3.
Precise problem description
Static meshing using quadtrees
Dynamic meshing
4. Applications
5.
Generating tiny meshes in 2-d
(1) Dynamic Simulation
Mesh
Partial Diff. Eqs.
Model
Visualize
Solve
(1) Dynamic Simulation
Mesh
Partial Diff. Eqs.
Model
Visualize
Solve
(1) Dynamic Simulation
Mesh
Partial Diff. Eqs.
Model
Visualize
Solve
(1) Dynamic Simulation
New requirements:
(1) Dynamic matrix assembly
Mesh
(2) Dynamic linear solver
(3) Dynamic visualizer
(4) Dynamic AMR
Partial Diff. Eqs.
Model
Visualize
Solve
(2) Dynamic with Features
• Dynamic algorithm
does not handle
segments, polygons, ...
• Dynamic SVR?
– Coming soon
(3) Out of core refinement
• Engineers want
billions of elements
• Doesn’t fit in memory
• Dynamic refinement
allows partial meshing
Outline
1.
2.
3.
4.
Precise problem description
Static meshing using quadtrees
Dynamic meshing
Applications
5. Generating tiny meshes in 2-d
Delaunay Refinement
• Quadtree criticism:
generates “very”
(constant factor)
large meshes.
• Har-Peled, Üngör 05:
• Don’t insert every
point in the quadtree
Üngör: off-centers
Any third point
in circle forms a
quality triangle
®
Refinement algorithm:
For all pairs,
If 9 p 2 circle
Choose p
Otherwise
Create p at off-center
Har-Peled, Üngör 2005
• Goal: O(n lg L/s) runtime
• Question : how to do
point location?
Refinement algorithm:
For all pairs,
If 9 p 2 circle
Choose p
Otherwise
Create p at off-center
Har-Peled, Üngör 2005
• Use quad-tree overlay
• For all pairs (a, b) with
a in smallest cell,
b in neighbouring cell
– If 9 p 2 circle
• Choose p
– Otherwise
• Create p at off-center
Har-Peled, Üngör 2005
• Use quad-tree overlay
• For all pairs (a, b) with
a in smallest cell,
b in neighbouring cell
– If 9 p 2 circle
• Choose p
– Otherwise
• Create p at off-center
Har-Peled, Üngör 2005
• Use quad-tree overlay
• For all pairs (a, b) with
a in 2nd - smallest cell,
b in neighbouring cell
– If 9 p 2 circle
• Choose p
– Otherwise
• Create p at off-center
Dynamic stability of HPÜ:
• Use quad-tree overlay
– O(lg L/s)-stable
• Off-center “blames” (a,b)
– Blame is transitive
– Same analysis as balance
– O(lg L/s)-stable
HPÜ is O(lg L/s)-stable
Conclusions
•
Dynamic Meshing in O(lg L/s) per update
–
–
•
•
•
Simple algorithm, optimal time
Implementation near-trivial
Output guarantees: same mesh as static
In 2-d: maintain mesh as small as known
To-do:
(1) features
(2) dynamize the rest of the world
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