Exponential Integrators John C. Bowman (University of Alberta) May 22, 2007 www.math.ualberta.ca/ bowman/talks 1
Exponential Integrators Outline 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) = x 0. Stiff: Nonlinearity f varies slowly in t compared with the value of the linear coefficient η: 1df f dt η Goal: Solve on the linear time scale exactly; avoid the linear time-step restriction ητ 1. In the presence of nonlinearity, straightforward integrating factor methods (cf. Lawson 1967) do not remove the explicit restriction on the linear time step τ. Instead, discretize the perturbed problem with a scheme that is exact 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) x 0 + t 0 fp d t. Change variables: P d t = η 1 dp ( P(t) x(t) = P 1 (t) x 0 + η 1 1 f dp ). Rectangular approximation of integral Exponential Euler: ( x i+1 = P 1 x i + P 1 ) f i, η 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) x i+1 = P 1 x i + 1 P 1 f(x i ), η Also called Exponentially Fitted Euler, ETD Euler, filtered Euler, Lie Euler. As τ 0 the Euler method is recovered: x i+1 = x i + τf(x i ). 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). x i+1 = P 1 i (x i + τf i ) can at best have an incorrect fixed point: x = τf(x) e ητ 1. 5
Comparison of Euler Integrators 0 dx dt + x = cosx, x(0) = 1. 0.01 error euler i euler e euler 0.02 0.03 0 1 2 3 4 5 t 6
History Certaine [1960]: Exponential Adams-Moulton Nørsett [1969]: Exponential Adams-Bashforth Verwer [1977] and van der Houwen [1977]: Exponential linear multistep 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: stiff order 2 Lu [2003]: Efficient Matrix Exponential Hochbruck & Ostermann [2005a, 2005b]: Explicit Exponential Runge-Kutta; stiff order conditions. 7
Generalization Let L be a linear operator with a stationary Green s function G(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 has the formal solution dx dt + Lx = f(x), x(0) = x 0, x(t) = e t 0 Ldt x 0 + t 0 G(t t )f(x(t )) dt. 8
Letting s = t t : x(t) = e t 0 Ldt x 0 + t 0 G(s)f(x(t s)) ds. Change integration variable to h = H(s) = s 0 G( s) d s: x(t) = e t 0 Ldt x 0 + H(t) 1 f ( x(t H 1 (h)) ) dh. Rectangular rule Predictor (Euler): Trapezoidal rule Corrector: x(t) e t 0 Ldt x 0 + f(x(0))h(t). x(t) e t 0 Ldt x 0 + f(x(0)) + f( x(t)) H(t). 2 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 [Bowman et al. 1997, Shadwick et al. 1999, Kotovych & Bowman 2002]. Lagrangian discretizations of advection equations are also exponential integrators: u t + v u = f(x,t, u), x u(x, 0) = u 0(x). η now represents the linear operator v x and P 1 u = e tv x u corresponds to the Taylor series of u(x vt). 10
Higher-Order Integrators General s-stage Runge Kutta scheme: x i = x 0 + τ i 1 j=0 a ij f(x j,t + b j τ), (i = 1,...,s). Butcher Tableau (s=4): b 0 a 10 b 1 a 20 a 21 b 2 a 30 a 31 a 32 b 3 a 40 a 41 a 42 a 43 11
Bogacki Shampine (3,2) Pair Embedded 4-stage pair [Bogacki & Shampine 1989]: 0 1 2 1 2 0 3 4 3 4 2 9 1 3 4 9 3rd order 1 7 24 1 4 1 3 1 8 2nd order Since f(x 3 ) is just f at the initial x 0 for the next time step, no additional source evaluation is required to compute x 4 [FSAL]. Also: 6-stage (5,4) pair [Bogacki & Shampine 1996]. 12
Vector Case When x is a vector, ν is typically a matrix: dx + νx = f(x). dt Let z = ντ. Discretization involves ϕ 1 (z) = z 1 (e z 1). Higher-order exponential integrators require ) j 1 ϕ j (z) = z (e j z z k. k! k=0 Exercise care when z has an eigenvalue near zero! Although a variable time step requires re-evaluation of the matrix exponential, this is not an issue for problems where the evaluation of the nonlinear term dominates the computation. Pseudospectral turbulence codes: diagonal matrix exponential. 13
Charged Particle in Electromagnetic Fields Lorentz force: mdv q dt = 1 v B + E. c Efficiently compute the matrix exponential exp(ω), where Ω = q mc τ 0 B z B y B z 0 B x. B y B x 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 20 exact PC E-PC 0 5 20 x 10 z 0 20 40 y 15
An Embedded 4-Stage (3,2) Exponential Pair Letting z = ντ and b 4 = 1: x i = e b iντ x 0 + τ i 1 j=0 a 10 = 1 ( ) 1 2 ϕ 1 2 z, a 20 = 3 ( ) 3 4 ϕ 1 4 z a 21, a 21 = 9 8 ϕ 2 a ij f(x j,t + b j τ), ( ) 3 4 z + 3 8 ϕ 2 (i = 1,...,s). ( ) 1 2 z, a 30 =ϕ 1 (z) a 31 a 32, a 31 = 1 3 ϕ 1(z), a 32 = 4 3 ϕ 2(z) 2 9 ϕ 1(z), a 40 =ϕ 1 (z) 17 12 ϕ 2(z), a 41 = 1 2 ϕ 2(z), a 42 = 2 3 ϕ 2(z), a 43 = 1 4 ϕ 2(z). (1) x 3 has stiff order 3 [Hochbruck and Ostermann 2005] (order is preserved even when ν is a general unbounded linear operator). x 4 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 E(k) 10 1 10 0 10 1 10 2 10 3 10 4 10 5 10 6 10 7 10 8 10 9 10 10 10 11 10 12 10 13 10 14 10 15 10 16 10 17 10 18 10 19 10 20 10 21 10 0 10 1 10 2 10 3 10 4 10 5 10 6 10 7 10 8 10 9 10 10 k 17
Conclusions Exponential integrators are explicit schemes for ODEs with a stiff linearity. When the nonlinear source is constant, the time-stepping algorithm is precisely the analytical solution to the corresponding first-order linear ODE. Unlike integrating factor methods, exponential integrators have the 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 evaluating these functions are available at www.math.ualberta.ca/ bowman/phi.h 18
Asymptote: The Vector Graphics Language symptote 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] [Bogacki & Shampine 1996] [Bowman et al. 1997] P. Bogacki & L. F. Shampine, Appl. Math. Letters, 2:1, 1989. P. Bogacki & L. F. Shampine, Comput. Math. Appl., 32:15, 1996. J. C. Bowman, B. A. Shadwick, & P. J. Morrison, Exactly conservative integrators, in 15th IMACS World Congress on Scientific Computation, Modelling and Applied Mathematics, edited by A. Sydow,
[Bowman et al. 2006] volume 2, pp. 595 600, Berlin, 1997, Wissenschaft & Technik. 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 in Mathematics, 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 in Mathematics, 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-Holland Publishing Co., Amsterdam, 1977, North-Holland Series in Applied Mathematics and Mechanics, Vol. 19. [Verwer 1977] J. Verwer, Numer. Math., 27:143, 1977.