5
12 !!" !# " # !" !!" " !" !$ !% " % $ ’()*+,-.(/ .0 1234-+( ! 5367 829 1234-+( :,;)<<4,); =>>? 1234-+( :(+@2;)( =>>? 1234-+( :A4-B.2- =>>? !!" !# " # !" !!" " !" !# " # %&’()*+,&- ,. /’+0&1 ! 2345 /01 /’+0&1 6*7’889*’7 :;;< /’+0&1 6&)=07’& :;;< /’+0&1 6>9+?,0+ :;;< (a) (b) Fig. 11 Trajectories (with the different codes, L = 6) of the planets: (a) Jupiter; (b) Saturn. ! !"# $ $"# % &$! ( !( !#"# !# !)"# !) !*"# !* !%"# !% !$"# +,-. /01,+ 2 $ 3456 !! 7,-.!8+.9 2 $! 3458 :;< $! /=.>4+,?. .==;= ;1 @4-,>+;1,416 :;< $! ;A =.>4+,?. .==;= ;1 @4-,>+;1,41 ?.=808 +,-. ,1 3458 ! *9BC %D., 7=2!")# =.<0>4= EFF G>488,G4> EFF H,+I;0+ EFF ! !"# $ $"# % &$! ( !!"!$# !!"!$ !!"!!# ! !"!!# !"!$ !"!$# !"!% !"!%# !"!) *+,- ./0+* 1 $ 2345 !! 6+,-!7*-8 1 $! 2347 9-:3*+;- -<<=< =0 >3,+:*=0+30 9-:3*+;- -<<=< =0 >3,+:*=0+30 ;-<7/7 *+,- +0 2347 ! )8?@ %A-+ 6<1!"B# <-C/:3< DEE F:377+F3: DEE (a) (b) Fig. 12 Plot of the relative error on the Hamiltonian of the system, L = 3, N L = 7, N o = 2, R reg = 0.45: (a) log 10 (relative error); (b) relative error. In Figure 11, we show the trajectories of Jupiter and Saturn, using the three codes (with FMM, with RFMM or without FMM). We can see that the trajectories are more stable using the RFMM instead of the FMM. In Figure 12, we consider an order of neighborhood N o = 2 and increase the ratio be- tween the size of the regularization zone and the length of the geometric groups to R reg = 0.45. Taking L = 3, we observe an error of order 10 -3 on the Hamiltonian, comparable to the results obtained with L = 5 and N o = 1. In Figure 13, we plot the trajectories of the planets both for the FMM and RFMM ap- proximations, and observe a gain of stability in the regular case. In terms of complexity of the algorithm, the observed overhead between FMM and RFMM is around 20% for L = 3, 10% for L = 5 and 6 and 1% for L = 10.

12 · Chartier and E. Faou. Volume-energy preserving integrators for piecewise smooth approximations of Hamiltonian systems. ... Geometric Numerical Integration: structure-preserving

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 12 · Chartier and E. Faou. Volume-energy preserving integrators for piecewise smooth approximations of Hamiltonian systems. ... Geometric Numerical Integration: structure-preserving

12

!!"!#

"#

!"

!!"

"

!"!$

!%

"

%

$

&

'()*+,-.(/&.0&1234-+(&!&5367

&

829

1234-+(&:,;)<<4,);&=>>?

1234-+(&:(+@2;)(&=>>?

1234-+(&:A4-B.2-&=>>?

!!"!#

"#

!"

!!"

"

!"!#

"

#

$

%&'()*+,&-$,.$/'+0&1$!$2345

$

/01

/'+0&1$6*7'889*'7$:;;<

/'+0&1$6&)=07'&$:;;<

/'+0&1$6>9+?,0+$:;;<

(a) (b)

Fig. 11 Trajectories (with the different codes, L = 6) of the planets: (a) Jupiter; (b) Saturn.

! !"# $ $"# %

&'$!(

!(

!#"#

!#

!)"#

!)

!*"#

!*

!%"#

!%

!$"#

+,-.'/01,+'2'$'3456'!!'7,-.!8+.9'2'$!'3458

:;<$!/=.>4+,?.'.==;=';1'@4-,>+;1,416

:;<$!';A'=.>4+,?.'.==;=';1'@4-,>+;1,41'?.=808'+,-.',1'3458'!'*9BC'%D.,'7=2!")#

'

'

=.<0>4='EFF

G>488,G4>'EFF

H,+I;0+'EFF

! !"# $ $"# %

&'$!(

!!"!$#

!!"!$

!!"!!#

!

!"!!#

!"!$

!"!$#

!"!%

!"!%#

!"!)

*+,-'./0+*'1'$'2345'!!'6+,-!7*-8'1'$!'2347

9-:3*+;-'-<<=<'=0'>3,+:*=0+30

9-:3*+;-'-<<=<'=0'>3,+:*=0+30';-<7/7'*+,-'+0'2347'!')8?@'%A-+'6<1!"B#

'

'

<-C/:3<'DEE

F:377+F3:'DEE

(a) (b)

Fig. 12 Plot of the relative error on the Hamiltonian of the system, L = 3, NL = 7, No = 2, Rreg = 0.45: (a)log10(relative error); (b) relative error.

In Figure 11, we show the trajectories of Jupiter and Saturn, using the three codes (withFMM, with RFMM or without FMM). We can see that the trajectories are more stable usingthe RFMM instead of the FMM.

In Figure 12, we consider an order of neighborhood No = 2 and increase the ratio be-tween the size of the regularization zone and the length of the geometric groups to Rreg =0.45. Taking L = 3, we observe an error of order 10!3 on the Hamiltonian, comparable tothe results obtained with L = 5 and No = 1.

In Figure 13, we plot the trajectories of the planets both for the FMM and RFMM ap-proximations, and observe a gain of stability in the regular case.

In terms of complexity of the algorithm, the observed overhead between FMM andRFMM is around 20% for L = 3, 10% for L = 5 and 6 and 1% for L = 10.

Page 2: 12 · Chartier and E. Faou. Volume-energy preserving integrators for piecewise smooth approximations of Hamiltonian systems. ... Geometric Numerical Integration: structure-preserving

13

!!"

"

!"

!!"

"

!"!#"

"

#"

$

%&'()*+,&-).$,/$+0)$12'3)+.$!$*2'..-*'2$/44$5167$#8)-9':%&

$

;<3

=<1-+)&

;'+<&3

>&'3<.

8)1+<3)

?2<+,

!!"

"

!"

!!"

"

!"!#"

"

#"

$

%&'()*+,&-).$,/$+0)$12'3)+.$!$&)452'&$/66$7189$#:)-;'<%&

$

=53

>51-+)&

='+5&3?&'35.

:)1+53)

@25+,

(a) (b)

Fig. 13 Trajectories of the planets around the Sun, L = 3 and No = 2, using: (a) a classical FMM, (b) theregular FMM.

4 Appendix

4.1 Details on the FMM approximation and FMM algorithm

The FMM approximation is based on the expansions given by the following results:

Result 1 (Multipole expansion): Assume that J source points {x j1 , ...,x jJ} are con-tained in a group Bsrc of center Csrc and of radius r. Let us denote by (! jp ," jp ,# jp) thespherical coordinates of (x jp !Csrc). Then for any xi such that "xi!Csrc"2 > r, denoting thespherical coordinates of (xi!Csrc) by (!is,"is,#is), we have the expansion

J

!p=1

1!!xi! x jp

!!q jp ="

!n=0

n

!m=!n

Mmn

!n+1is

Y mn ("is,#is) (7)

with

Mmn =

J

!p=1

q jp !njpY!m

n (" jp ,# jp).

and Y mn a spherical harmonic. The corresponding error estimate is

"""""

J

!p=1

1!!xi! x jp

!!q jp !L

!n=0

n

!m=!n

Mmn

!n+1is

Y mn ("is,#is)

"""""#!J

p=1""q jp

""

!is! r

#r

!is

$L+1(8)

Result 2 (Conversion of a multipole expansion to a local expansion): Consider theJ source points defined for Result 1. Let us consider that the target point xi is contained ina group Btrg of center Ctrg and radius r. Denoting by (!st ,"st ,#st ) the spherical coordinatesof (Csrc!Ctrg) and by (!i,"i,#i) the spherical coordinates of (xi!Ctrg), under the conditionthat !st =

!!Ctrg!Csrc!! > 2r, the expansion given by (7) can be written

J

!p=1

1!!xi! x jp

!!q jp ="

!l=0

l

!k=!l

Lkl ! l

i Ykl ("i,#i) (9)

Page 3: 12 · Chartier and E. Faou. Volume-energy preserving integrators for piecewise smooth approximations of Hamiltonian systems. ... Geometric Numerical Integration: structure-preserving

14

with the translation operation

Lkl =

"

!n=0

n

!m=!n

Mmn ı|k!m|!|k|!|m| Am

n Akl Y m!k

l+n ("st ,#st)(!1)nAm!k

l+n ! l+n+1st

. (10)

andAm

n =(!1)n

%(n!m)!(n+m)!

.

We denote by TBtrg Bsrc the translation operator which maps (Mmn )m,n onto (Lk

l )l,k and write

(Lkl )l,k = TBtrg Bsrc(M

mn )m,n (11)

The corresponding error estimate is"""""

J

!p=1

1!!xi! x jp

!!q jp !L

!l=0

l

!k=!l

Lkl ! l

i Ykl ("i,#i)

"""""#!J

p=1""q jp

""

cr! r

#1c

$L+1(12)

with c satisfying !st > (c+1)r.The spherical harmonics are given from the associate Legendre functions Pm

n :

Y mn (" ,#) =

&(n! |m|)!(n+ |m|)! P|m|

n (cos")eım# . (13)

The associate Legendre functions can be calculated recursively thanks to the relations'((((()

(((((*

Pkk (cos") = (2k)!

2kk! (!sin")k

Pkk+1(cos") = (2k +1) cos" Pk

k (cos")

+$k % 0,

(l! k)Pkl (cos") = (2l!1)cos"Pk

l!1(cos")! (l + k!1)Pkl!2(cos")

$l,k/ 0# k # l!2

(14)

The derivation of the previous results is given in [12] and [13]. The definition of the spe-cial functions involved in those expansions and further details about their properties can befound in [16].

The first steps of the algorithm given in Subsection 2.1.1 can be written more preciselyas follows:

• Step 0: Calculation of some q-independant quantities.· Precalculation related to the translation operators TBtrg Bsrc .· The far moments: $Bsrc &B, $x j & Bsrc, with (x j!Csrc)' (! j," j,# j)

f l,kj = ! l

jY!kl (" j,# j) (15)

· The local moments: $Btrg &B, $xi & Btrg, with (xi!Ctrg)' (!i,"i,#i)

gl,ki = ! l

i Ykl ("i,#i) (16)

• Step 1: Calculation of the far fields: $Bsrc &B,

Fl,kBsrc

= !x j&Bsrc

q j f l,kj (17)

Page 4: 12 · Chartier and E. Faou. Volume-energy preserving integrators for piecewise smooth approximations of Hamiltonian systems. ... Geometric Numerical Integration: structure-preserving

15

• Step 2: Calculation of the local fields – translations: $Btrg &B,

(Gl,kBtrg

)l,k = !Bsrc far from Btrg

TBtrg Bsrc(F$ ,%Bsrc

)$ ,% (18)

• Step 3: Accumulation of the far interactions: $Btrg &B, $xi & Btrg,

(Aq) f ari =

L

!l=0

l

!k=!l

gl,ki Gl,k

Btrg(19)

• Step 4: Calculation of the close interactions: $Btrg &B, $xi & Btrg,

(Aq)closei = !

Bsrc close to Btrg

!x j&Bsrc

1!!xi! x j!!q j (20)

where L is the truncature parameter involved in the approximation of the multipole and localexpansions (7) and (9).

4.2 Details on the FMM approximation of the gradient energy

The FMM approximation of the kernel #xG(x,y) is derived from the FMM approximationof the kernel G(x,y) = 1

"x!y" by derivating the local moment gl,ki w.r.t xi, with the correspon-

dance (xi!Ctrg)' (!i,"i,#i) involved in (16). This derivation is performed below usingthe fact that the quantity gl,k

i is polynomial w.r.t (xi!Ctrg).For x = (x1,x2,x3) & R3 of spherical coordinates (!," ,#), let us introduce the notation

E kl (x1,x2,x3) = ! lY k

l (" ,#)

Thanks to the definition of the spherical harmonics (13), and the recursive relations on theassociate Legendre functions (14), a simple exercise shows the following relations

E 00 (x1,x2,x3) = 1

E ll (x1,x2,x3) = (!x1! ix2)l

((2l)!

2l l!E l

l+1(x1,x2,x3) = x3(

2l +1 E ll (x1,x2,x3)

E kl+2(x1,x2,x3) = Ck

l x3 E kl+1(x1,x2,x3)+Dk

l !2 E kl (x1,x2,x3)

E !kl (x1,x2,x3) = E k

l (x1,x2,x3)

(21)

with

Ckl =

2l +3%(l +2+ k)(l +2! k)

and Dkl =!

&(l +1+ k)(l +1! k)(l +2+ k)(l +2! k)

It comes directly the following relations for the gradient of E kl

#E 00 (x1,x2,x3) = 0

#E ll (x1,x2,x3) = l

(x1+ix2) E ll (x1,x2,x3) V1

#E ll+1(x1,x2,x3) =

(2l+1

(x1+ix2) E ll (x1,x2,x3) V2

(22)

with V1 = (1, i,0)T and V2 = (x3 l , ix3 l , x1 + ix2)T .

Page 5: 12 · Chartier and E. Faou. Volume-energy preserving integrators for piecewise smooth approximations of Hamiltonian systems. ... Geometric Numerical Integration: structure-preserving

16

References

1. P. Chartier and E. Faou. Volume-energy preserving integrators for piecewise smooth approximations ofHamiltonian systems. M2AN, vol. 42 (2), pp. 223-241, 2008.

2. E. Hairer, C. Lubich and G. Wanner. Geometric Numerical Integration: structure-preserving algorithmsfor ordinary differential equations, Second edition, Springer, vol. 31, 2006.

3. B. Laird and B. Leimkuhler, A molecular dynamics algorithm for mixed hard-core/continuous potentials,Molecular Physics 98 (2000), 309-316.

4. Anne Kvaerno and Ben Leimkuhler, A time-reversible, regularized, switching integrator for the n-bodyproblem, SIAM Journal on Scientific Computing 22 (2000), no. 3, 1016-1035.

5. K. N. Kudin and G. E. Scuseria. Range definitions for Gaussian-type charge distributions in fast multipolemethods. J. Chem. Phys. 111 (6), pp. 2351-2356, aug. 1999.

6. J. C. Burant, M. C. Strain, G. E. Scuseria and M. J. Frisch. Analytic energy gradients for the Gaussianvery fast multipole method (GvFMM). Chem. Phys. Lett., 248, pp. 43-49, jan. 1996.

7. M. C. Strain, G. E. Scuseria and M. J. Frisch. Achieving linear scaling for the electronic quantum Coulombproblem. Science, 271, pp. 51-53, jan. 1996.

8. C. A. White and M. Head-Gordon. Rotating around the quartic angular momentum barrier in fast multipolemethod calculation. J. Chem. Phys. 105 (12), pp. 5061-5067, sept. 1996.

9. Y. Shao, C. A. White and M. Head-Gordon. Efficient evaluation of the Coulomb force in density-functionaltheory calculations. J. Chem. Phys. 114 (15), pp. 6572-6577, april 2001.

10. C. A. White, B. G. Johnson, P. M.W. Gill and M. Head-Gordon. Linear scaling density functional calcu-lations via the continuous fast multipole method. Chem. Phys. Lett., 253, pp. 268-278, may 1996.

11. C. A. White, B. G. Johnson, P. M.W. Gill and M. Head-Gordon. The continuous fast multipole method.Chem. Phys. Lett., 230, pp. 8-16, nov. 1994.

12. L. Greengard and V. Rokhlin. The Rapid Evaluation of Potential Fields in Three Dimensions. in VortexMethods, Lecture Notes in Mathematics, 1360, Springer-Verlag, pp. 121-141, 1988.

13. L. Greengard and V. Rokhlin. A New Version of the Fast Multipole Method for the Laplace equation inthe three dimensions. Acta Numerica, pp. 229-269, 1997.

14. J.A. Board and W.S. Elliot. Fast fourier transform accelerated fast multipole algorithm. Technical Report94-001, Duke University Dept of Electrical Engineering, 1994.

15. H. G. Petersen, D. Soelvason, J. W. Perram and E. R. Smith. The very fast multipole method. J. Chem.Phys. 101 (10), pp. 8870-8876, nov. 1994.

16. M. Abramowitz and I. A. Stegun. Handbook of Mathematical Functions with Formulas, Graphs, andMathematical Tables, John Wiley, New York, 1972.