exponential integrators - ualberta.cabowman/talks/caims07.pdfhistory •certaine [1960]: exponential...
TRANSCRIPT
Exponential Integrators
John C. Bowman (University of Alberta)
May 22, 2007
www.math.ualberta.ca/∼bowman/talks
1
Outline
•Exponential Integrators
– Exponential Euler
– History
•Generalizations
– Stationary Green Function
– Higher-Order
– Vector Case
– Conservative Exponential Integrators
– Lagrangian Discretizations
•Charged Particle in Electromagnetic Fields
•Embedded Exponential Runge–Kutta (3,2) Pair
•Conclusions
2
Exponential Integrators
•Typical stiff nonlinear initial value problem:
dx
dt+ η x = f (t, x), x(0) = x0.
• Stiff: Nonlinearity f varies slowly in t compared with the valueof the linear coefficient η:
∣∣∣∣1
f
df
dt
∣∣∣∣≪ |η|
•Goal: Solve on the linear time scale exactly; avoid the lineartime-step restriction ητ ≪ 1.
• In the presence of nonlinearity, straightforward integratingfactor methods (cf. Lawson 1967) do not remove the explicitrestriction on the linear time step τ .
• Instead, discretize the perturbed problem with a scheme that isexact on the time scale of the solvable part.
3
Exponential Euler Algorithm
•Express exact evolution of x in terms of P (t) = eηt:
x(t) = P−1(t)
(x0 +
∫ t
0
fP dt
).
•Change variables: P dt = η−1dP ⇒
x(t) = P−1(t)
(x0 + η−1
∫ P (t)
1
f dP
).
•Rectangular approximation of integral ⇒ Exponential Euler:
xi+1 = P−1
(xi +
P − 1
ηfi
),
where P = eητ and τ is the time step.
•The discretization is now with respect to P instead of t.
4
Exponential Euler Algorithm (E-Euler)
xi+1 = P−1xi +1 − P−1
ηf (xi),
•Also called Exponentially Fitted Euler, ETD Euler, filteredEuler, Lie–Euler.
•As τ → 0 the Euler method is recovered:
xi+1 = xi + τf (xi).
• If E-Euler has a fixed point, it must satisfy x =f (x)
η; this is
then a fixed point of the ODE.
• In contrast, the popular Integrating Factor method (I-Euler).
xi+1 = P−1i (xi + τfi)
can at best have an incorrect fixed point: x =τf (x)
eητ − 1.
5
Comparison of Euler Integrators
dx
dt+ x = cos x, x(0) = 1.
−0.03
−0.02
−0.01
0
error
0 1 2 3 4 5
t
euler
i euler
e euler
6
History
•Certaine [1960]: Exponential Adams-Moulton
•Nørsett [1969]: Exponential Adams-Bashforth
•Verwer [1977] and van der Houwen [1977]: Exponential linearmultistep method
•Friedli [1978]: Exponential Runge-Kutta
•Hochbruck et al. [1998]: Exponential integrators up to order 4
•Beylkin et al. [1998]: Exact Linear Part (ELP)
•Cox & Matthews [2002]: ETDRK3, ETDRK4; worst case: stifforder 2•Lu [2003]: Efficient Matrix Exponential
•Hochbruck & Ostermann [2005a, 2005b]: Explicit ExponentialRunge-Kutta; stiff order conditions.
7
Generalization
•Let L be a linear operator with a stationary Green’s functionG(t, t′) = G(t − t′):
∂G(t, t′)
∂t+ LG(t, t′) = δ(t − t′).
•Let f be a continuous function of x. Then the ODE
dx
dt+ Lx = f (x), x(0) = x0,
has the formal solution
x(t) = e−∫
t
0L dt′x0 +
∫ t
0
G(t − t′)f (x(t′)) dt′.
8
•Letting s = t − t′:
x(t) = e−∫
t
0L dt′x0 +
∫ t
0
G(s)f (x(t − s)) ds.
•Change integration variable to h = H(s) =∫ s
0G(s) ds:
x(t) = e−∫
t
0L dt′x0 +
∫ H(t)
1
f(x(t − H−1(h))
)dh.
•Rectangular rule ⇒ Predictor (Euler):
x(t) ≈ e−∫
t
0L dt′x0 + f (x(0))H(t).
•Trapezoidal rule ⇒ Corrector:
x(t) ≈ e−∫
t
0L dt′x0 +
f (x(0)) + f (x(t))
2H(t).
9
Other Generalizations
•Higher-order exponential integrators: Hochbruck et al. [1998],Cox & Matthews [2002], Hochbruck & Ostermann [2005a],Bowman et al. [2006].
•Vector case (matrix exponential P = eηt).
•Exponential versions of Conservative Integrators [Bowmanet al. 1997, Shadwick et al. 1999, Kotovych & Bowman 2002].
•Lagrangian discretizations of advection equations are alsoexponential integrators:
∂u
∂t+ v
∂
∂xu = f (x, t, u), u(x, 0) = u0(x).
• η now represents the linear operator v ∂∂x
and
P−1u = e−tv ∂
∂x u
corresponds to the Taylor series of u(x − vt).
10
Higher-Order Integrators
•General s-stage Runge–Kutta scheme:
xi = x0 + τ
i−1∑
j=0
aijf (xj, t + bjτ ), (i = 1, . . . , s).
•Butcher Tableau (s=4):
b0 a10
b1 a20 a21
b2 a30 a31 a32
b3 a40 a41 a42 a43
11
Bogacki–Shampine (3,2) Pair
•Embedded 4-stage pair [Bogacki & Shampine 1989]:
01
2
1
20
3
4
3
4
2
9
1
3
4
9
17
24
1
4
1
3
1
8
3rd order
2nd order
• Since f (x3) is just f at the initial x0 for the next time step, noadditional source evaluation is required to compute x4 [FSAL].
•Also: 6-stage (5,4) pair [Bogacki & Shampine 1996]. 12
Vector Case
•When x is a vector, ν is typically a matrix:
dx
dt+ νx = f (x).
•Let z = −ντ . Discretization involves
ϕ1(z) = z−1(ez − 1).
•Higher-order exponential integrators require
ϕj(z) = z−j
(ez −
j−1∑
k=0
zk
k!
).
•Exercise care when z has an eigenvalue near zero!
•Although a variable time step requires re-evaluation of thematrix exponential, this is not an issue for problems where theevaluation of the nonlinear term dominates the computation.
•Pseudospectral turbulence codes: diagonal matrix exponential.13
Charged Particle in Electromagnetic Fields
•Lorentz force:
m
q
dv
dt=
1
cv×B + E.
•Efficiently compute the matrix exponential exp(Ω), where
Ω = −q
mcτ
0 Bz −By
−Bz 0 Bx
By −Bx 0
.
•Requires 2 trigonometric functions, 1 division, 1 square root,and 35 additions or multiplications.
•The other necessary matrix factor, Ω−1[exp(Ω) − 1] requires
care, since Ω is singular. Evaluate it as
limλ→0
[(Ω + λ1)−1(eΩ − 1)].
14
Motion Under Lorentz Force
10
5
20
x
0
20
40
y
10
20
z
exactPCE-PC
15
An Embedded 4-Stage (3,2) Exponential Pair•Letting z = −ντ and b4 = 1:
xi = e−biντx0 + τ
i−1∑
j=0
aijf (xj, t + bjτ ), (i = 1, . . . , s).
a10=1
2ϕ1
(1
2z
),
a20=3
4ϕ1
(3
4z
)− a21, a21=
9
8ϕ2
(3
4z
)+
3
8ϕ2
(1
2z
),
a30=ϕ1(z) − a31 − a32, a31=1
3ϕ1(z), a32=
4
3ϕ2(z) −
2
9ϕ1(z),
a40=ϕ1(z) −17
12ϕ2(z), a41=
1
2ϕ2(z), a42=
2
3ϕ2(z), a43=
1
4ϕ2(z). (1)
•x3 has stiff order 3 [Hochbruck and Ostermann 2005] (order ispreserved even when ν is a general unbounded linear operator).
•x4 provides a second-order estimate for adjusting the time step.
•ν → 0: reduces to [3,2] Bogacki–Shampine Runge–Kutta pair. 16
Application to GOY Turbulence Shell Model
10−2110−2010−1910−1810−1710−1610−1510−1410−1310−1210−1110−1010−910−810−710−610−510−410−310−210−1100101
E(k
)
100 101 102 103 104 105 106 107 108 109 1010
k
17
Conclusions
•Exponential integrators are explicit schemes for ODEs with astiff linearity.
•When the nonlinear source is constant, the time-steppingalgorithm is precisely the analytical solution to thecorresponding first-order linear ODE.
•Unlike integrating factor methods, exponential integrators havethe correct fixed point behaviour.
•We present an efficient adaptive embedded 4-stage (3,2)exponential pair.
•A similar embedded 6-stage (5,4) exponential pair also exists.
•Care must be exercised when evaluating ϕj(x) near 0.Accurate optimized double precision routines for evaluatingthese functions are available atwww.math.ualberta.ca/∼bowman/phi.h
18
Asymptote: The Vector Graphics Language
symptotesymptotesymptotesymptotesymptotesymptotesymptotesymptotesymptotesymptotesymptote
http://asymptote.sf.net
(freely available under the GNU public license)
19
References
[Beylkin et al. 1998] G. Beylkin, J. M. Keiser, &L. Vozovoi, J. Comp. Phys.,147:362, 1998.
[Bogacki & Shampine 1989] P. Bogacki & L. F. Shampine, Appl.Math. Letters, 2:1, 1989.
[Bogacki & Shampine 1996] P. Bogacki & L. F. Shampine,Comput. Math. Appl., 32:15, 1996.
[Bowman et al. 1997] J. C. Bowman, B. A. Shadwick,& P. J. Morrison, “Exactlyconservative integrators,” in15th IMACS World Congress
on Scientific Computation,
Modelling and Applied
Mathematics, edited by A. Sydow,
volume 2, pp. 595–600, Berlin,1997, Wissenschaft & Technik.
[Bowman et al. 2006] J. C. Bowman, C. R. Doering,B. Eckhardt, J. Davoudi,M. Roberts, & J. Schumacher,Physica D, 218:1, 2006.
[Certaine 1960] J. Certaine, Math. Meth. Dig.Comp., p. 129, 1960.
[Cox & Matthews 2002] S. Cox & P. Matthews, J. Comp.Phys., 176:430, 2002.
[Friedli 1978] A. Friedli, Lecture Notes inMathematics, 631:214, 1978.
[Hochbruck & Ostermann 2005a] M. Hochbruck & A. Ostermann,SIAM J. Numer. Anal., 43:1069,2005.
[Hochbruck & Ostermann 2005b] M. Hochbruck & A. Ostermann,Appl. Numer. Math., 53:323, 2005.
[Hochbruck et al. 1998] M. Hochbruck, C. Lubich, &H. Selfhofer, SIAM J. Sci. Comput.,19:1552, 1998.
[Kotovych & Bowman 2002] O. Kotovych & J. C. Bowman, J.Phys. A.: Math. Gen., 35:7849,2002.
[Lu 2003] Y. Y. Lu, J. Comput. Appl. Math.,161:203, 2003.
[Nørsett 1969] S. Nørsett, Lecture Notes inMathematics, 109:214, 1969.
[Shadwick et al. 1999] B. A. Shadwick, J. C. Bowman,& P. J. Morrison, SIAM J. Appl.Math., 59:1112, 1999.
[van der Houwen 1977] P. J. van der Houwen,Construction of integration
formulas for initial value
problems, North-HollandPublishing Co., Amsterdam, 1977,North-Holland Series in AppliedMathematics and Mechanics, Vol.19.
[Verwer 1977] J. Verwer, Numer. Math., 27:143,1977.