Laplacian-Centered Poisson Solvers and Multilevel Summation Algorithms Dmitry Yershov 1 Stephen Bond 1 Robert Skeel 2 1 University of Illinois at Urbana-Champaign 2 Purdue University 2009 SIAM Annual Meeting D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 1 / 20
Outline 1 Introduction 2 Problem formulation 3 Discretization techniques 4 Multilevel Summation Method (MSM) 5 Numerical experiments D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 2 / 20
Introduction Poisson and Generalized Poisson equations arise in numerous areas of science and engineering For many problems of interest analytical solution is not known Naive numerical implementation usually requires significant computational time to achieve reasonable accuracy Fast algorithms are critical for advances in many fields of research D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 3 / 20
Problem formulation Generalized Poisson Equation (GPE): (ɛ( x) Φ( x)) = ρ( x) D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 4 / 20
Problem formulation Generalized Poisson Equation (GPE): Where (ɛ( x) Φ( x)) = ρ( x) ρ( x) = N k=1 q kδ( x x k ) D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 4 / 20
Problem formulation Generalized Poisson Equation (GPE): Where (ɛ( x) Φ( x)) = ρ( x) ρ( x) = N k=1 q kδ( x x k ) ɛ( x) = ɛ 0 const. x Ω 0 D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 4 / 20
Problem formulation Generalized Poisson Equation (GPE): Where (ɛ( x) Φ( x)) = ρ( x) ρ( x) = N k=1 q kδ( x x k ) ɛ( x) = ɛ 0 const. x Ω 0 ɛ( x) = ɛ 1 const. x Ω 1 D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 4 / 20
Problem formulation Generalized Poisson Equation (GPE): Where (ɛ( x) Φ( x)) = ρ( x) ρ( x) = N k=1 q kδ( x x k ) ɛ( x) = ɛ 0 const. x Ω 0 ɛ( x) = ɛ 1 const. x Ω 1 ɛ( x) smoothly changes its value between ɛ 0 and ɛ 1 in Ω region D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 4 / 20
Difficulties with solving GPE directly Singularities in charge distribution Unbounded domain Boundary conditions at infinity D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 5 / 20
Solvent reaction and effective charge distribution Effective charge distribution ɛ 0 Φ( x) = ρ( x) + ρ f ( x) D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 6 / 20
Solvent reaction and effective charge distribution Effective charge distribution ɛ 0 Φ( x) = ρ( x) + ρ f ( x) If x Ω 0, then ρ f ( x) = 0 D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 6 / 20
Solvent reaction and effective charge distribution Effective charge distribution ɛ 0 Φ( x) = ρ( x) + ρ f ( x) If x Ω 0, then ρ f ( x) = 0 If x Ω 1, then ρ f ( x) = 0 D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 6 / 20
Solvent reaction and effective charge distribution Effective charge distribution ɛ 0 Φ( x) = ρ( x) + ρ f ( x) If x Ω 0, then ρ f ( x) = 0 If x Ω 1, then ρ f ( x) = 0 If x Ω, then ( ɛ( x) ) ρ f ( x) log ( ɛ 0 Φ( x) ) = 0 ɛ 0 1 ( ɛ 0 Φ( x) = ρ( x 4π x x ) + ρ f ( x ) ) d x Ω D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 6 / 20
Discretization with Projection method G(r) = 1 4πr ( ɛ( x) ) ρ f ( x) log G( x x ) ( ρ( x ) + ρ f ( x ) ) d x = 0 ɛ 0 Ω Discretize domain with Cartesian grid D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 7 / 20
Discretization with Projection method G(r) = 1 4πr ( ɛ( x) ) ρ f ( x) log G( x x ) ( ρ( x ) + ρ f ( x ) ) d x = 0 ɛ 0 Ω Discretize domain with Cartesian grid Let {φ i } be basis functions D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 7 / 20
Discretization with Projection method G(r) = 1 4πr ( ɛ( x) ) ρ f ( x) log G( x x ) ( ρ( x ) + ρ f ( x ) ) d x = 0 ɛ 0 Ω Discretize domain with Cartesian grid Let {φ i } be basis functions Approximate solution ρ = i ρ iφ i D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 7 / 20
Discretization with Projection method G(r) = 1 4πr ( ɛ( x) ) ρ f ( x) log G( x x ) ( ρ( x ) + ρ f ( x ) ) d x = 0 ɛ 0 Ω Discretize domain with Cartesian grid Let {φ i } be basis functions Approximate solution ρ = i ρ iφ i r = ρ log(ɛ/ɛ 0 ) G(ρ + ρ) D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 7 / 20
Discretization with Projection method G(r) = 1 4πr ( ɛ( x) ) ρ f ( x) log G( x x ) ( ρ( x ) + ρ f ( x ) ) d x = 0 ɛ 0 Ω Discretize domain with Cartesian grid Let {φ i } be basis functions Approximate solution ρ = i ρ iφ i r = ρ log(ɛ/ɛ 0 ) G(ρ + ρ) Minimize residual by projecting it on test space rψ j = 0 D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 7 / 20
Linear system of equations Linear system Where I is the identity matrix (I A)x = f A ij = j log(ɛ( x)/ɛ 0 ) G( x x i ) x is vector of unknown coefficients ρ i f j = j log(ɛ( x)/ɛ 0 ) ( k q kg( x x k ) ) D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 8 / 20
New difficulties have arisen In general, matrix A is dense, due to Green s function global support Matrix-vector product costs O(N 2 ) operations All iterative solvers use at least O(N 2 ) operations to find solution Can we do better? D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 9 / 20
Fast matrix-vector product and N-body solver We need to compute ɛ 0 Φ( x) = G( x x ) ( ρ( x ) + ρ( x ) ) d x = k G( x x k )q k + i G( x x i )ρ i Use fast N-body solver to compute electrostatic potential and forces We use Multilevel Summation Method (MSM) as fast and easy-to-implement N-body solver D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 10 / 20
Green s function splitting G = G 4 3.5 G 3 2.5 G i (r) 2 1.5 1 0.5 0 0 0.5 1 1.5 2 2.5 3 r D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 11 / 20
Green s function splitting G = G G 1 + G 1 4 3.5 G 3 G 1 2.5 G i (r) 2 1.5 1 0.5 0 0 0.5 1 1.5 2 2.5 3 r D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 11 / 20
Green s function splitting G = G G 1 + G 1 G 2 + G 2 4 3.5 G 3 G 1 2.5 G 2 G i (r) 2 1.5 1 0.5 0 0 0.5 1 1.5 2 2.5 3 r D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 11 / 20
Green s function splitting G = G G 1 + G 1 G 2 + G 2 +... 4 3.5 G 3 G 1 2.5 G 2 G i (r) 2 1.5 1 0.5 0 0 0.5 1 1.5 2 2.5 3 r D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 11 / 20
Green s function splitting G = G G 1 + G 1 G 2 + G 2 G 3 +... = G 0,1 + G 1,2 + G 2,3 +... 2 1.8 1.6 1.4 G G 1 G 1 G 2 G 2 G 3 G i (r) G i+1 (r) 1.2 1 0.8 0.6 0.4 0.2 0 0 0.5 1 1.5 2 2.5 3 r D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 12 / 20
Matrix form of MSM Mesh restrict prolongate levels restrict prolongate anterpolate interpolate Particle level calculate directly G( x x ) = G 0,1 ( x x ) + P 1 ( x) ( G 1,2 + P 2 (G 2,3 +...)R 2 ) R1 ( x ) D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 13 / 20
ε Born ion problem Point charge at origin Spherically symmetric ɛ( x) = ɛ(r), where r = x Analytic solution exists for any ɛ ρ f (r) = q ɛ 0ɛ (r) r 2 ɛ 2 (r) 80 8 0.1 0.3 0.5 0.7 0.9 1.1 1.3 1.5 r D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 14 / 20
Scalability and error versus system size time [sec. / it.] 10 4 10 2 10 0 no MSM a/h = 4 a/h = 6 a/h = 8 % relative error 10 2 10 1 10 0 no MSM a/h = 4 a/h = 6 a/h = 8 1000 8000 64000 1000000 number of elements 10 1 0.02 0.05 0.1 0.2 h [A] a is Green s function cutoff radius h is grid s step-size D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 15 / 20
Methanol molecule D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 16 / 20
Methanol molecule effective charge and reaction field D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 17 / 20
Methanol molecule in vacuum vs. water solution D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 18 / 20
Conclusion We developed fast and scalable algorithm for solving GPE With use of MSM we achieved linear complexity Method is second order accurate in terms of grid s step-size D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 19 / 20
The END Thank you! D. Yershov (Computer Science @ UIUC) Laplace-Centered Poisson Solvers and MSM 2009 SIAM Annual Meeting 20 / 20