An Efficient Two-Level Preconditioner for Multi-Frequency Wave Propagation Problems M. Baumann, and M.B. van Gijzen Email: M.M.Baumann@tudelft.nl Delft Institute of Applied Mathematics Delft University of Technology Delft, The Netherlands May 19, 217 M. Baumann An optimal shift-and-invert preconditioner 1 / 27
Motivation (1/3) Seismic exploration: elastic wave equation in frequency-domain only forward problem c geophysicsrocks! Marmousi-II problem with 2,371,2 dofs 256 z [m] Solve (K + iω k C ω 2 k M)x k = b 185 2 4 x [m] displacement at f = 6 Hz 312 1e 9 1.8 for multiple frequencies ω k. z [m] 185 2 4 x [m].6 M. Baumann An optimal shift-and-invert preconditioner 2 / 27
Motivation (1/3) Seismic exploration: elastic wave equation in frequency-domain only forward problem c geophysicsrocks! Marmousi-II problem with 2,371,2 dofs 256 z [m] Solve (K + iω k C ω 2 k M)x k = b 185 2 4 x [m] displacement at f = 6 Hz 312 1e 9 1.8 for multiple frequencies ω k. K, C, M z [m] 185 2 4 x [m].6 M. Baumann An optimal shift-and-invert preconditioner 2 / 27
Motivation (2/3) Linearization: ([ ] [ ]) [ ] ic K M ωk x ω k I k = I x k... (K + iω k C ω 2 k M)x k = b [ ] b, k = 1,..., N ω Single preconditioner: ([ ] [ ]) 1 P(τ) 1 ic K M = τ I I [ ] [ ] [ ] I τi I I = I (K + iτc τ 2 M) 1 I ic + τm M. Baumann An optimal shift-and-invert preconditioner 3 / 27
Motivation (2/3) Linearization: ([ ] [ ]) [ ] ic K M ωk x ω k I k = I x k... (K + iω k C ω 2 k M)x k = b [ ] b, k = 1,..., N ω Single preconditioner: ([ ] [ ]) 1 P(τ) 1 ic K M = τ I I [ ] [ ] [ ] I τi I I = I (K + iτc τ 2 M) 1 I ic + τm M. Baumann An optimal shift-and-invert preconditioner 3 / 27
Motivation (3/3) Convergence behavior for two different τ. 1 1 Relative residual norm 1 2 3 4 5 6 bad τ Relative residual norm 1 2 3 4 5 6 good τ 7 7 8 2 4 6 8 1 12 14 Number of matrix vector multiplications 8 5 1 15 2 25 3 35 Number of matrix vector multiplications M. Baumann An optimal shift-and-invert preconditioner 4 / 27
Motivation (3/3) Convergence behavior for two different τ. 1 1 Relative residual norm 1 2 3 4 5 6 bad τ Relative residual norm 1 2 3 4 5 6 good τ 7 7 8 2 4 6 8 1 12 14 Number of matrix vector multiplications 8 5 1 15 2 25 3 35 Number of matrix vector multiplications M. Baumann An optimal shift-and-invert preconditioner 4 / 27
Outlook 1 The shift-and-invert preconditioner within multi-shift GMRES 2 Optimization of seed frequency τ 3 Numerical experiments Validations Shifted Neumann preconditioner Matrix equation with rotation M. Baumann An optimal shift-and-invert preconditioner 5 / 27
Shift-and-invert preconditioner for GMRES Want to solve A := [ ] ic K, B := I [ ] M I (A ω k B)x k = b, k = 1,..., N ω, with a single preconditioner P(τ) = (A τb): (A ω k B)P 1 k y k = b (A(A τb) 1 η k I )y k = b M. Baumann An optimal shift-and-invert preconditioner 6 / 27
Shift-and-invert preconditioner for GMRES Want to solve A := [ ] ic K, B := I [ ] M I (A ω k B)x k = b, k = 1,..., N ω, with a single preconditioner P(τ) = (A τb): (A ω k B)P 1 k y k = b (A(A τb) 1 η k I )y k = b M. Baumann An optimal shift-and-invert preconditioner 6 / 27
Shift-and-invert preconditioner for GMRES Want to solve A := [ ] ic K, B := I [ ] M I (A ω k B)x k = b, k = 1,..., N ω, with a single preconditioner P(τ) = (A τb): (A ω k B)P 1 k y k = b ( C η k I )y k = b M. Baumann An optimal shift-and-invert preconditioner 6 / 27
Multi-shift GMRES... Did you know? For shifted problems, (C η k I )y k = b, k = 1,..., N ω, Krylov spaces are shift-invariant K m (C, b) K m (C ηi, b) η C. Multi-shift GMRES: (C η k I )V m = V m+1 (H m η k I) Reference A. Frommer and U. Glässner. Restarted GMRES for Shifted Linear Systems. SIAM J. Sci. Comput., 19(1), 15 26 (1998) M. Baumann An optimal shift-and-invert preconditioner 7 / 27
Multi-shift GMRES... Did you know? For shifted problems, (C η k I )y k = b, k = 1,..., N ω, Krylov spaces are shift-invariant K m (C, b) K m (C ηi, b) η C. Multi-shift GMRES: (C η k I )V m = V m+1 (H m η k I) Reference A. Frommer and U. Glässner. Restarted GMRES for Shifted Linear Systems. SIAM J. Sci. Comput., 19(1), 15 26 (1998) M. Baumann An optimal shift-and-invert preconditioner 7 / 27
Optimization of seed frequency ( A(A τb) 1 ω ) k ω k τ I y k = b Theorem: GMRES convergence bound [Saad, Iter. Methods] Let the eigenvalues of a matrix be enclosed by a circle with radius R and center c. Then the GMRES-residual norm after i iterations r (i) satisfies, r (i) ( ) R(τ) i r () c 2(X ), c(τ) where X is the matrix of eigenvectors, and c 2 (X ) its condition number in the 2-norm. M. Baumann An optimal shift-and-invert preconditioner 8 / 27
Optimization of seed frequency ( A(A τb) 1 ω ) k ω k τ I y k = b Theorem: msgmres convergence bound [Saad, Iter. Methods] Let the eigenvalues of a matrix be enclosed by a circle with radius R k and center c k. Then the GMRES-residual norm after i iterations r (i) k satisfies, r (i) k ( ) r () c Rk (τ) i 2(X ), k = 1,..., N ω, c k (τ) where X is the matrix of eigenvectors, and c 2 (X ) its condition number in the 2-norm. M. Baumann An optimal shift-and-invert preconditioner 8 / 27
The preconditioned spectra no damping N ω = 5 1.5 imag part.5 1 1.5.5 1 1.5 real part M. Baumann An optimal shift-and-invert preconditioner 9 / 27
The preconditioned spectra no damping N ω = 5 1 imag part.5 R c k.5 1 1.5.5 1 1.5 real part M. Baumann An optimal shift-and-invert preconditioner 9 / 27
The preconditioned spectra with damping ɛ > ˆω k := (1 ɛi)ω k 2 1.5 imag part 1.5.5 1.5 1.5.5 1 1.5 real part M. Baumann An optimal shift-and-invert preconditioner 9 / 27
The preconditioned spectra with damping ɛ > ˆω k := (1 ɛi)ω k 2 R(τ) c k+1 1.5 c k imag part 1 c R ϕ k.5 c 1.5 1.5 1.5.5 1 1.5 real part M. Baumann An optimal shift-and-invert preconditioner 1 / 27
The preconditioned spectra Lemma: Optimal seed shift for msgmres [B/vG, 216] (i) For λ Λ[AB 1 ] it holds I(λ). (ii) The preconditioned spectra are enclosed by circles of radii R k and center points c k. (iii) The points {c k } Nω k=1 C described in statement (ii) lie on a circle with center c and radius R. (iv) Consider the preconditioner P(τ ) = A τ B. An optimal seed frequency τ for preconditioned multi-shift GMRES is given by, ( ) τ (ɛ) = min max Rk (τ) =... = τ C k=1,..,n ω c k = 2ω1ω N ω i ω 1 + ω Nω [ɛ2 (ω 1 + ω Nω ) 2 + (ω Nω ω 1) 2 ] ω 1ω Nω ω 1 + ω Nω M. Baumann An optimal shift-and-invert preconditioner 11 / 27
The preconditioned spectra Proof (1/4) Proof. (i) We have to show I(ω) for, [ ] ic K x = ω I [ ] M x I or, alternatively (λ = iω), consider the QEP, (K + λc + λ 2 M)v =. R(λ) I(ω) M. Baumann An optimal shift-and-invert preconditioner 12 / 27
The preconditioned spectra Proof (1/4) Proof. (i) We have to show I(ω) for, [ ] ic K x = ω I [ ] M x I or, alternatively (λ = iω), consider the QEP, (K + λc + λ 2 M)v =. R(λ) I(ω) M. Baumann An optimal shift-and-invert preconditioner 12 / 27
The preconditioned spectra Proof (2/4) (ii) The preconditioned spectra are enclosed by circles. Factor out AB 1, C η k I = A(A τb) 1 η k I = AB 1 (AB 1 τi ) 1 η k I, and note that Λ[AB 1 ] λ is a Möbius transformation ( ). λ λ τ ω k ω k τ, Reference M.B. van Gijzen, Y.A. Erlangga, C. Vuik. Spectral Analysis of the Discrete Helmholtz Operator Preconditioned with a Shifted Laplacian. SIAM J. Sci. Comput., 29(5), 1942 1958 (27) ( ) : z az+b cz+d M. Baumann An optimal shift-and-invert preconditioner 13 / 27
The preconditioned spectra Proof (3/4) (iii) Spectra are bounded by circles (c k, R). These center point {c k } Nω k=1 lie on a big circle (c, R). 1. Construct center: ( ɛ τ 2 ) c =, C 2I(τ)(I(τ) + ɛr(τ)) 2. A point c k has constant distance to c: R 2 = c k c 2 2 = τ 2 (ɛ 2 + 1) 4(I(τ) + ɛr(τ)) 2 (independent of ω k ) M. Baumann An optimal shift-and-invert preconditioner 14 / 27
The preconditioned spectra with damping ɛ > ˆω k := (1 ɛi)ω k 2 R(τ) c k+1 1.5 c k imag part 1 c R ϕ k.5 c 1.5 1.5 1.5.5 1 1.5 real part M. Baumann An optimal shift-and-invert preconditioner 15 / 27
The preconditioned spectra Proof (4/4) 1. (iv) Find optimal τ. 1..96 τ = min max τ C k=1,..,n ω 1 c k = f (c, R, ϕ k ) ( ) R c k 2 polar coordinates 3 τ ϕ = (optimize along ϕ) imag part (relative).8.6.4.2. τ ˆω min ˆω max.92.88.84.8.76.72.68..2.4.6.8 1. real part (relative).64 M. Baumann An optimal shift-and-invert preconditioner 16 / 27
The preconditioned spectra Proof (4/4) 1. (iv) Find optimal τ. 1..96 τ = min max τ C k {1,N ω} 1 c k = f (c, R, ϕ k ) ( ) R c k 2 polar coordinates 3 τ ϕ = (optimize along ϕ) imag part (relative).8.6.4.2. τ ˆω min ˆω max.92.88.84.8.76.72.68..2.4.6.8 1. real part (relative).64 M. Baumann An optimal shift-and-invert preconditioner 16 / 27
The preconditioned spectra Proof (4/4) 1. (iv) Find optimal τ. 1..96 τ = min max τ C k {1,N ω} 1 c k = f (c, R, ϕ k ) ( ) R c k 2 polar coordinates 3 τ ϕ = (optimize along ϕ) imag part (relative).8.6.4.2. τ ˆω min ˆω max.92.88.84.8.76.72.68..2.4.6.8 1. real part (relative).64 τ = 2ω 1ω Nω ω 1 +ω Nω [ɛ i 2 (ω 1 +ω Nω ) 2 +(ω Nω ω 1 ) 2 ]ω 1 ω Nω ω 1 +ω Nω M. Baumann An optimal shift-and-invert preconditioner 16 / 27
1 The shift-and-invert preconditioner within multi-shift GMRES 2 Optimization of seed frequency τ 3 Numerical experiments Validations Shifted Neumann preconditioner Matrix equation with rotation M. Baumann An optimal shift-and-invert preconditioner 17 / 27
The (damped) time-harmonic elastic wave equation Continuous setting Elastic wave equation Discrete setting Solve ˆω k = (1 ɛi)ω k ωk 2 ρ(x)u k σ(u k ) = s with boundary conditions iω k ρ(x)bu k + σ(u k )ˆn =, σ(u k )ˆn =, on Ω a Ω r. (K + iω k C ωk 2 M)u k = s with FEM matrices K ij = σ(ϕ i ) : ϕ j dω, Ω M ij = ρ(x)ϕ i ϕ j dω, Ω C ij = ρ(x)bϕ i ϕ j dγ. Ω a nutils M. Baumann An optimal shift-and-invert preconditioner 18 / 27
The (damped) time-harmonic elastic wave equation Continuous setting Elastic wave equation Discrete setting Solve ˆω k = (1 ɛi)ω k ωk 2 ρ(x)u k σ(u k ) = s with boundary conditions iω k ρ(x)bu k + σ(u k )ˆn =, σ(u k )ˆn =, on Ω a Ω r. (K + iω k C ωk 2 M)u k = s with FEM matrices K ij = σ(ϕ i ) : ϕ j dω, Ω M ij = ρ(x)ϕ i ϕ j dω, Ω C ij = ρ(x)bϕ i ϕ j dγ. Ω a nutils M. Baumann An optimal shift-and-invert preconditioner 18 / 27
Numerical experiments Validations and second-level preconditioners Set-up: An elastic wedge problem. Density 21 u_z at 16. Hz 1e 1 2.4 u_x at 24. Hz 1e 11 1. 27 24 2..75 21 1.6.5 4 198 4 1.2 4.25 z [m] 195 z [m].8 z [m]. 192.4 189..25 8 186 8.4 8.5 183.8.75 1 3 6 x [m] 18 1 3 6 x [m] 1 3 6 x [m] M. Baumann An optimal shift-and-invert preconditioner 19 / 27
Numerical experiments (1/4) Validations I τ (ɛ) = ω 1 ω Nω (1 + ɛ 2 ) e i arctan ( ) ɛ 2 (ω 1 +ω Nω ) 2 +(ω Nω ω 1 ) 2 4ω 1 ω Nω ω min /2π [Hz] ω max /2π [Hz] N ω # iterations CPU time [s] 5 16 45.6 1 5 1 16 48.7 2 16 47.3 5 251 25.1 1 1 1 252 223.7 2 252 243.5 damping factor ɛ =.5 #dofs = 48, 642 (Q 1 finite elements) M. Baumann An optimal shift-and-invert preconditioner 2 / 27
Numerical experiments (2/4) Validations II 1 1 N ω = 5 Convergence behavior: ω min and ω max converge slowest, smallest factor R/ c k yields fastest convergence, inner frequencies for free. Relative residual norm 2 3 4 5 6 7 8 5 1 15 2 25 3 35 Number of matrix vector multiplications 2 1.5 1.5.5 2 1.5 1.5.5 1 1.5 M. Baumann An optimal shift-and-invert preconditioner 21 / 27
Numerical experiments (3/4) Shifted Neumann preconditioner Apply a Neumann polynomial preconditioner of degree n. 14 12 14 12 ɛ =.5 ɛ =.3 ɛ =.1 ɛ =.5 1 1 Number of iterations 8 6 Number of iterations 8 6 4 4 2 ɛ =.5 ɛ =.3 ɛ =.1 ɛ =.5 1..8.6.4.2. Seed shift (scaled imag part) 2 1..8.6.4.2. Seed shift (scaled imag part) case n = case n = 5 M. Baumann An optimal shift-and-invert preconditioner 22 / 27
Numerical experiments (4/4) Matrix equation with rotation Solve matrix equation, A(X) := KX + icxω MXΩ 2 = B. Spectrum of A P 1 1 1.5 1. imag part.5..5 1.5 1..5..5 1. 1.5 real part M. Baumann An optimal shift-and-invert preconditioner 23 / 27
Numerical experiments (4/4) Matrix equation with rotation Solve matrix equation, A(X) := KX + icxω MXΩ 2 = B. Spectrum of A P 1 1 P 1 2 1.5 e i(φ 2 φ 1 ) 1. imag part.5..5 1.5 1..5..5 1. 1.5 real part M. Baumann An optimal shift-and-invert preconditioner 23 / 27
Summary 1 1 2 3 4 5 6 7 Relative residual norm 1 2 3 4 5 6 7 bad τ 4 3 2 1 1 2 3 4 5 8 2 4 6 8 1 12 14 Number of matrix vector multiplications 1 2 1.5 1.5 Relative residual norm 1 2 3 4 5 6 7 good τ.5 2 1.5 1.5.5 1 1.5 8 5 1 15 2 25 3 35 Number of matrix vector multiplications M. Baumann An optimal shift-and-invert preconditioner 24 / 27
Summary 1 1 2 3 4 5 6 7 Relative residual norm 1 2 3 4 5 6 7 bad τ 4 3 2 1 1 2 3 4 5 8 2 4 6 8 1 12 14 Number of matrix vector multiplications 1 2 1.5 1.5 Relative residual norm 1 2 3 4 5 6 7 good τ.5 2 1.5 1.5.5 1 1.5 8 5 1 15 2 25 3 35 Number of matrix vector multiplications M. Baumann An optimal shift-and-invert preconditioner 24 / 27
Conclusions Optimal shift-and-invert preconditioner for msgmres. Second level: Shifted Neumann preconditioner & rotations in matrix equation approach. For multi-core CPUs: Splitting strategy of frequency range. Optimality for ɛ = only by continuity.? Relation to pole selection in rational Krylov methods. Thank you for your attention! M. Baumann An optimal shift-and-invert preconditioner 25 / 27
Conclusions Optimal shift-and-invert preconditioner for msgmres. Second level: Shifted Neumann preconditioner & rotations in matrix equation approach. For multi-core CPUs: Splitting strategy of frequency range. Optimality for ɛ = only by continuity.? Relation to pole selection in rational Krylov methods. Thank you for your attention! M. Baumann An optimal shift-and-invert preconditioner 25 / 27
References M. Baumann and M.B. van Gijzen. Nested Krylov methods for shifted linear systems. SIAM J. Sci. Comput., 37(5), S9-S112 (215). M. Baumann, R. Astudillo, Y. Qiu, E. Ang, M.B. van Gijzen, and R.-E. Plessix. An MSSS-Preconditioned Matrix Equation Approach for the Time-Harmonic Elastic Wave Equation at Multiple Frequencies. DIAM Technical Report 16-4, TU Delft [accepted]. M. Baumann and M.B. van Gijzen. Efficient iterative methods for multi-frequency wave propagation problems: A comparison study. Proceedings of ICCS 217 [accepted]. M. Baumann and M.B. van Gijzen. An Efficient Two-Level Preconditioner for Multi-Frequency Wave Propagation Problems. DIAM Technical Report 17-3, TU Delft [under review]. Research funded by Shell. M. Baumann An optimal shift-and-invert preconditioner 26 / 27
Finite element discretization in Python FEM discretization of stiffness matrix K, K ij = σ(ϕ i ) : ϕ j dω, where Ω ( ) σ(ϕ i ) = λ(x)div(ϕ i )I 3 + µ(x) ϕ i + ( ϕ i ) T, becomes in nutils: ndims = 3 phi = domain.splinefunc(degree=2).vector(ndims) stress = lambda u: lam*u.div(geom)[:,_,_]*function.eye(ndims) + mu*u.symgrad(geom) elast = function.outer( stress(phi), phi.grad(geom) ).sum([2,3]) K = domain.integrate(elast, geometry=geom, ischeme= gauss2 ) Go back M. Baumann An optimal shift-and-invert preconditioner 27 / 27