Docsity

Slide Notes on Algorithms - Advance Topic in Numerical Method | CMSC 878R, Study notes of Computer Science

Partial preview of the text

Download Slide Notes on Algorithms - Advance Topic in Numerical Method | CMSC 878R and more Study notes Computer Science in PDF only on Docsity!

Lecture 9 CMSC878R/AMSC698R

Outline

Homework 3

Review

Homework 4

Data Structures

Quadtrees, Octrees, Generalizations …

Operations on them

The need for S expansions

power series (basis of interpolation)Near an analytic function expect quickly convergent

  • Or not converge at all– However far away this series may converge slowly

Far field expansions may converge faster

1/(1+x

2 )

has small radius of convergence for power series

However, expansion in terms of 1/

x

is quickly convergent

excludes the singularityIf the function is not analytic, we need an expansion that

x

i

y

j

exp(

ik

x

i

y

j

x

i

y

j

S expansions do this

The need for R expansions & S|R translation

consolidate multiple R and S expansions into one.In a given neighborhood without singularities easier to

Notation

Series are

p

truncated versions of infinite series

Series have error bound

p

), and radius of convergence

r

For

S

expansion series is valid for all

y-x

*

|>r

If expansion is in terms of singular functions, then

r

must be large enough

Translation

system (reference frame)a series expansion and express it in another coordinateTake a function or equivalently a function expressed as

definitionFunction is the same on the common parts of domains of

– but is represented in different forms

x i , y )

  • ∑ m b m ( x i

x

) S

m ( y - x * )

m

a

m^

( x

i , x

(^) ) R

m

( y

x

) with a

m

= (S|R)

mn

b

m

Middleman Algorithm

Sources

Sources

Evaluation

Points

Evaluation

Points

Standard algorithm

Middleman algorithm

N
M
N
M

Total number of operations:

O(NM)

Total number of operations:

O(N+M

)

X

Four Key Stones of FMM

Factorization

Error

Translation

Grouping

SLFMM Algorithm

Step 1. Generate S-expansion coefficients

for each box

For n

NonEmpty

Get

x c ( n )

, the center of the box;

loop over all non-empty boxes

For

x i (^) ∈

E

1 ( n )

Get

B

x i , x c ( n ) ) , the S-expansion coefficients

C near the center of the box;

( n ) = C (

n ) +^

ui

B

x i , x c ( n )

C ( n ) = 0 ; End;

End;

loop over all sources in the box All we need is to get C Implementation can be different!

( n ).

SLFMM Algorithm

Step 2. (S|R)-translate expansion coefficients

For n

NonEmptySource

Get

x c ( n )

, the center of the box;

containing sourcesloop over all boxes

For m

∈ I 3 ( n )

Get

x c ( m )

, the center of the box;

D

( n ) =

D

( n )

  • (
S
R

x c ( n )

x c ( m ) )

C

( m ) ;

D ( n ) = 0 ; End;

End;

The neighborhood of the loop over all non-empty boxes outside

n-

th box

All we need is to get D Implementation can be different!

( n ).

SLFMM Algorithm

Step 3. Final Summation

For n

NonEmptyEvaluation

Get

x c ( n )

, the center of the box;

For

x i (^) ∈

E

2 ( n )

v j (^) =

D ( n ) R ( y j - x c (

n ) ) ;

End;

End;

loop over all evaluation points in the box All we need is to get Implementation can be different!

v

j

containing evaluation points loop over all boxes

For

y j ∈ E 1 ( n )

v j = v j + Φ ( y j , x i

End;

neighborhood of the loop over all sources in the

n -th box

Asymptotic Complexity of SLFMM

By some magic we can easily find neighbors, and lists of points in each box.

Translation is performed by straightforward

P x P

matrix-vector multiplication,

where

P ( p ) is the total length of the translation vector. So the complexity of a

single translation is

O ( P 2 ).

The source and evaluation points are distributed uniformly, and there are

K

boxes, with

s

source points in each box (

s=N/K

). We call

s

the

grouping

(or

clustering

) parameter.

The number of neighbors for each box is

O

(1).

Assume that:

Selection of Optimal

K

(or

s

F
K
K

opt

Complexity of Optimized SLFMM