M ti ti Motivation Motivation

advertisement
S l i g EikonalEquations
Solving
Eik
lEq ti
on
T i g l dS
Triangulated
Surface
f
Mesh
M h with
i h CUDA
Zhisong
so g Fu,
Fuu, Ross
oss T
T.. Whitaker
W ta e
School of Computing,
Computing
p
g, Universityy of Utah
M ti ti
Motivation
I this
In
thi project,
j t we consider
id the
th numerical
i l solution
l ti off the
th Eikonal
Eik
l
equations,
equa
tio s, a spec
special
ial case o
off nonlinear
o li ea Hamilton-Jacobi
Ha ilto Jacob
J
bi pa
partial
tial
diff
differential
ti l equations
q ti
(PDE )), defined
((PDEs),
d fi d on a three
th
di
dimensional
i
l
surface with a scalar speed
p
function:
I
Implementation
l
t ti
Algorithm
1.Partition
1
Partition
‹In the process of partitioning,
partitioning we will use edges instead of
coordinates thus our partition can be viewed as the graph-based
coordinates,
partition
‹We use METIS [2] as partition tool (See the figure below for a
partition result of a dragon)
S is a surface domain.
domain The solution of this equation simulates
travel time of the wave propagation with speed f at x from some
source points whose values are zero.
zero The Eikonal equation
appears in various Applications,
Applications such as computer vision,
vision image
processing computer graphics,
processing,
graphics geoscience,
geoscience and medical image
analysis.
analysis
Background
g
1.Fast
1
Fast iteraive method(FIM)[1]
‹ iterative computational technique to solve the Eikonal
‹An
equation
ti efficiently
ffi i tl on parallel
ll l architectures.
hit t
‹Thi method
‹This
th d relies
li on a modification
difi ti off a label-correcting
llabel
b l correcting
ti method.
th d
‹Th core elements
‹The
‹
l
t ffor our FIM based
b
d method
th d are:
((1)) Upwind
Up i d scheme:
h
calculate
l l t the
th value
l
att a vertex
t
with
ith the
th
values of the solved vertices.
vertices
((2)) Active list management:
g
Active list contains the p
patches which
has wave front vertices.
vertices If a active patch is convergent,
convergent it is
removed from the Active list and its neighbor patches are added
to this list.
list
(3) Patch-based iteration: divide the whole mesh into patches to
fit into GPU cores.
cores
(4) Triangle
Triangle-based
based Jacobi update: update all the triangles inside a
patch
h concurrently
l with
i h parallel
ll l threads
h d and
d each
h thread
h d updates
d
values
l
off the
th three
th
ti
triangle
l vertices.
ti
2 M th d description
2.Method
d
ipti
((1)) Firstly,
Fi tly, p
partition
titi the
th mesh
h into
i t p
patches.
t h
((2)) Add the p
patches which contain the source vertices to active list.
list
((3)) Assign
g each p
patch to a GPU stream p
processor and iterate
multiple times for each patch.
patch
(4) Then check if a patch is convergent which means all the vertices
of this patch are convergent.
convergent Remove a convergent patch from the
active list and add its neighbor patches.
patches
(5) Check if the patches in active list are already convergent,
convergent if so
remove
remove.
( ) Iterate again.
(6)
again
3 S it bilit for
3.Suitability
f GPU
‹E h vertex
‹Each
t updates
d t independently
i d
d tl
‹A
‹According
‹
di g to
t the
th algorithm,
lg ith , update
pd t operation
p ti can b
be completed
pl t d
conc rrently
concurrently
2.triangle-based
2
triangle
g based datastructure
‹Geo array:
‹Geo-array:
y divided into subsegment
g
for each patch
p
and each
patch subsegment contains geometric data and speed information
for each triangle: three floats for edge lengths of the triangle and
one float for speed
speed.
‹Input-value-array and Output-value-array: hold all the vertex
values(float) of all triangles patch by patch
patch.
‹
‹index-array:
‹index
array: an integer array with each integer element
representing
ti an index
i d off a vertex
t value
l in
i the
th value
l array.
R
Result
lt
‹Geo-array and index-array are in global memory and Valuearrays are copied into shared memory for multiple updates
updates.
3 Local solver
3.Local
As in the figure below,
below local solver calculate the value of a vertex of
the triangle ΔABC from the other two vertices.
vertices Without loss of
generality we only talk about calculating value of C,
C , from values
off A and
d B,
B
,
. f is
i the
th speed.
d
Assume wave propagation direction is from
D to
t C,
C and
d
we get:
t
And the location of D must minimize
, so let:
,We
We can solve for
and then substitute into above
equation to get
.
Reference
1. A Fast Iterative Method For EikonalEquations.
1
EikonalEquations
q
Won KiJEONG
Won-KiJEONG,
Ross Whitaker.
Whitaker
2 METIS: A Family of Multilevel Partitioning Algorithms.
2.
Algorithms
http://glaros dtc umn edu/gkhome/views/metis
http://glaros.dtc.umn.edu/gkhome/views/metis
1
Download