Deflation acceleration of the PCG method applied to porous...
Transcript of Deflation acceleration of the PCG method applied to porous...
Delft University of Technology
Deflation acceleration of the PCG methodapplied to porous media flow
Kees Vuik
Delft University of Technology
Delft Institute of Applied Mathematics
SIAM Conference on Mathematical and Computational Issues in the Geosciences
Domain-based and Krylov-based Deflation Methods for Flow in Porous Media
March 20, 2007, Santa Fe, New Mexico
Kees Vuik, March 20, 2007 1 – p.1/29
Delft University of Technology
Contents
1. Introduction
2. IC preconditioned CG
3. Deflated ICCG
4. Physical deflation vectors
5. Conclusions
Kees Vuik, March 20, 2007 2 – p.2/29
Delft University of Technology
1. Introduction
MotivationKnowledge of the fluid pressure in rock layers is important for an oilcompany to predict the presence of oil and gas in reservoirs.
The earth’s crust has a layered structure
Kees Vuik, March 20, 2007 3 – p.3/29
Delft University of Technology
Mathematical model
Computation of fluid pressure −div(σ∇p(x)) = 0 on Ω, p fluid pressure,σ permeability
δ ΩD
δ ΩN
δ ΩN
δ ΩN
Ω4
Ω7
Ω3
Ω5
Ω2
Ω6
Ω1
σh = 1 ( sand) σl = ε = 10−7 (shale)
Kees Vuik, March 20, 2007 4 – p.4/29
Delft University of Technology
Properties and Applications
Ax = b
A is sparse and SPDCondition number of A is O(107), due to large contrast in permeability
Applications- reservoir simulations- porous media flow- electrical power networks- semiconductors- magnetic field simulations
- fictitious domain methods
Kees Vuik, March 20, 2007 5 – p.5/29
Delft University of Technology
2. IC preconditioned CG
Error estimateAx = b
M−1Ax = M−1b
x − xk = (M−1A)−1M−1A(x − xk)
‖x − xk‖2 ≤ 1λmin
‖M−1rk‖2
λmin: smallest eigenvalue of M−1A
Kees Vuik, March 20, 2007 6 – p.6/29
Delft University of Technology
Test problem
earth surface
shale
sandstone
shale
sandstone
shale
sandstone
sandstone
Configuration with 7 straight layers
Kees Vuik, March 20, 2007 7 – p.7/29
Delft University of Technology
Convergence CG
0 5 10 15 20 25 30 35 4010
−6
10−5
10−4
10−3
10−2
10−1
100
101
102
estimate
||rk||
2
λmin
number of iterations
Convergence behavior of CG without preconditioning
Kees Vuik, March 20, 2007 8 – p.8/29
Delft University of Technology
Convergence CG
100
101
102
103
104
10−10
10−5
100
105
estimate
||x−xk||
2
||rk||
2
λmin
number of iterations
Convergence behavior of CG without preconditioning
Kees Vuik, March 20, 2007 9 – p.9/29
Delft University of Technology
Convergence ICCG
10 20 30 40 50 60
10−12
10−10
10−8
10−6
10−4
10−2
100
102
104
estimate
||x−xk||
2
||M−1rk||
2
λmin
number of iterations
Convergence behavior of ICCG
Kees Vuik, March 20, 2007 10 – p.10/29
Delft University of Technology
Spectrum of IC preconditioned matrix
L is the Incomplete Cholesky factor of A
ks is the number of high-permeability domains not connected to aDirichlet boundary
D is a diagonal matrix (dii > 0) and A = D−1
2 AD−1
2
Theorem 1 (scaling invariance)L−1AL−T and L−1AL−T are identical.
Proof:
L = D−1
2 L and L−1AL−T = L−1D1
2 (D−1
2 AD−1
2 )D1
2 L−T = L−1AL−T .
Kees Vuik, March 20, 2007 11 – p.11/29
Delft University of Technology
Spectrum of IC preconditioned matrix
Take D =diag(A)
Theorem 2A has ks eigenvalues of O(ε), where ε is the ratio between high andlow permeability.
Theorem 3The IC preconditioned matrix L−1AL−T has ks eigenvalues of O(ε).
Proof: Scaling invariance (Theorem 1) implies
spectrum(L−1AL−T ) = spectrum(L−1AL−T )
In [Vuik, Segal, Meijerink, Wijma, 2001] we have shown that thenumber and size of small eigenvalues of A and L−1AL−T are thesame. The theorem is proven by using Theorem 2.
Kees Vuik, March 20, 2007 12 – p.12/29
Delft University of Technology
3. Deflated ICCG
Idea: remove the bad eigenvectors from the error/residual.
Krylov Ar
Preconditioned Krylov M−1Ar
Block Preconditioned Krylovm∑
i=1
(M−1i )Ar
Block Preconditioned Deflated Krylovm∑
i=1
(M−1i )PAr
Kees Vuik, March 20, 2007 13 – p.13/29
Delft University of Technology
3. Deflated ICCG
Idea: remove the bad eigenvectors from the error/residual.
Various choices are possible:
• Projection vectorsPhysical vectors, eigenvectors, coarse grid projection vectors(constant, linear, ...)
• Projection methodDeflation, coarse grid projection, balancing, augmented, FETI
• Implementationsparseness, with(out) using projection properties, optimized, ...
Kees Vuik, March 20, 2007 13 – p.13/29
Delft University of Technology
Literature
Deflated CG (start)
Nicolaides 1987, Mansfield 1990
Deflated CG (further development)
Graham and Hagger 1997, 1999, Kolotilina 1998, Vuik, Segal andMeijerink 1999, Saad, Yeung, Erhel and Guyomarc’h 2000, Frank andVuik 2001, Aksoylu, Rodriguez, Klie and Wheeler 2006, Nabben andVuik 2004, 2006, Scheichl and Graham, 2006
Deflation and restarted GMRES
Morgan 1995, Erhel, Burrage and Pohl 1996, Chapman and Saad1997, Morgan 2002, Giraud and Gratton 2005, Kilmer and De Sturler2006
Kees Vuik, March 20, 2007 14 – p.14/29
Delft University of Technology
Literature
Deflated CG (start)
Nicolaides 1987, Mansfield 1990
Deflated CG (further development)
Graham and Hagger 1997, 1999, Kolotilina 1998, Vuik, Segal andMeijerink 1999, Saad, Yeung, Erhel and Guyomarc’h 2000, Frank andVuik 2001, Aksoylu, Rodriguez, Klie and Wheeler 2006, Nabben andVuik 2004, 2006, Scheichl and Graham, 2006
Deflation and restarted GMRES
Morgan 1995, Erhel, Burrage and Pohl 1996, Chapman and Saad1997, Morgan 2002, Giraud and Gratton 2005, Kilmer and De Sturler2006
Kees Vuik, March 20, 2007 14 – p.14/29
Delft University of Technology
Literature
Deflated CG (start)
Nicolaides 1987, Mansfield 1990
Deflated CG (further development)
Graham and Hagger 1997, 1999, Kolotilina 1998, Vuik, Segal andMeijerink 1999, Saad, Yeung, Erhel and Guyomarc’h 2000, Frank andVuik 2001, Aksoylu, Rodriguez, Klie and Wheeler 2006, Nabben andVuik 2004, 2006, Scheichl and Graham, 2006
Deflation and restarted GMRES
Morgan 1995, Erhel, Burrage and Pohl 1996, Chapman and Saad1997, Morgan 2002, Giraud and Gratton 2005, Kilmer and De Sturler2006
Kees Vuik, March 20, 2007 14 – p.14/29
Delft University of Technology
Deflated ICCG
A is SPD, Conjugate Gradients
P = I − AZE−1ZT with E = ZT AZ
and Z = [z1...zm], where z1, ..., zm are independent deflation vectors.
Properties
1. P T Z = 0 and PAZ = 0
2. P 2 = P
3. AP T = PA
Kees Vuik, March 20, 2007 15 – p.15/29
Delft University of Technology
Deflated ICCG
x = (I − PT )x + PT x
(I − PT )x = ZE−1ZT Ax = ZE−1ZT b, AP T x = PAx = Pb
DICCGk = 0, r0 = Pr0, p1 = z1 = L−T L−1r0;
while ‖rk‖2 > ε dok = k + 1;αk = (rk−1,zk−1)
(pk,PApk) ;xk = xk−1 + αkpk;rk = rk−1 − αkPApk;zk = L−T L−1rk;βk = (rk,zk)
(rk−1,zk−1) ; pk+1 = zk + βkpk;
end while
Kees Vuik, March 20, 2007 16 – p.16/29
Delft University of Technology
Deflated ICCG
x = (I − PT )x + PT x
(I − PT )x = ZE−1ZT Ax = ZE−1ZT b, AP T x = PAx = Pb
DICCGk = 0, r0 = Pr0, p1 = z1 = L−T L−1r0;
while ‖rk‖2 > ε dok = k + 1;αk = (rk−1,zk−1)
(pk,PApk) ;xk = xk−1 + αkpk;rk = rk−1 − αkPApk;zk = L−T L−1rk;βk = (rk,zk)
(rk−1,zk−1) ; pk+1 = zk + βkpk;
end while
Kees Vuik, March 20, 2007 16 – p.16/29
Delft University of Technology
Convergence and termination criterion
Choose z1 , z2 , z3 eigenvectors of L−T L−1A
Convergence
‖PT x − PT xk‖2 ≤ 2√
K‖P T x − PT x0‖2
(√K − 1√K + 1
)k
where K = λn
λ4
Termination criterion
‖L−T L−1Pb − L−T L−1PAxk‖2 ≤ δ
λ4implies ‖P T x − PT xk‖2 ≤ δ
‘
Kees Vuik, March 20, 2007 17 – p.17/29
Delft University of Technology
Deflation vectors
Choose eigenvectors of L−T L−1A. Properties of cross sections:• a constant value in sandstone layers• in shale layers their graph is linear
5 10 15 20 25 30 35 40
−0.25
−0.2
−0.15
−0.1
−0.05
0
0.05
0.1
0.15
0.2
0.25
Gridpoint in vertical direction
Val
ue
First eigenvector
Kees Vuik, March 20, 2007 18 – p.18/29
Delft University of Technology
Eigenvectors of L−T
L−1
A
5 10 15 20 25 30 35 40
−0.25
−0.2
−0.15
−0.1
−0.05
0
0.05
0.1
0.15
0.2
0.25
Gridpoint in vertical direction
Val
ue
Second eigenvector
5 10 15 20 25 30 35 40
−0.25
−0.2
−0.15
−0.1
−0.05
0
0.05
0.1
0.15
0.2
0.25
Gridpoint in vertical direction
Val
ue
Third eigenvector
Kees Vuik, March 20, 2007 19 – p.19/29
Delft University of Technology
4. Physical deflation vectors
k is number of subdomains
Ωi, i = 1, ..., ks high-permeability subdomains without a Dirichlet B.C.;i = ks + 1, ..., kh remaining high-permeability subdomains
• define zi for i ∈ 1, ..., ks• zi = 1 on Ωi and zi = 0 on Ωj , j 6= i, j ∈ 1, ..., kh• zi satisfies equation:
−div(σj∇zi) = 0 on Ωj , j ∈ kh + 1, ..., k,
with appropriate boundary conditions
Sparse vectors, subproblems are cheap to solve
Kees Vuik, March 20, 2007 20 – p.20/29
Delft University of Technology
Physical deflation vectors
Example with ks = 2, kh = 3, and k = 5The geometry
δ ΩN
δ ΩN
δ ΩD
δ ΩNΩ
1Ω
2Ω
3Ω
4Ω
5
The first projection vector The second projection vector
Kees Vuik, March 20, 2007 21 – p.21/29
Delft University of Technology
Physical deflation vectors
Example with ks = 2, kh = 3, and k = 5The first projection vector The second projection vector
Kees Vuik, March 20, 2007 21 – p.21/29
Delft University of Technology
Properties
Theorem 4The deflation vectors are such that for D = diag(A)
• ‖D−1Azi‖∞ = O(ε)
• ‖L−T L−1Azi‖2 = O(ε)
Define Z = [z1...zks ] and U = [u1...uks ], where ui are ’small’eigenvectors.
Theorem 5
There is a matrix X such that Z = UX + E, with ‖E‖2 = O(√
ε)
Kees Vuik, March 20, 2007 22 – p.22/29
Delft University of Technology
Sensitivity of deflation vectors
• Random vector added in shale layers (amplitude α/2)
α 0 10−1 1 ICCG
λper 0.164 0.164 8.2 · 10−3 1.6 · 10−9
iter 14 15 24 54
• Random vector added to the nonzero parts
α 0 10−3 10−1 ICCG
λper 0.164 9 · 10−4 9 · 10−8 1.6 · 10−9
iter 14 27 56 54
After perturbation the smallest eigenvalues remain exactly zero,however, the smallest non-zero eigenvalue can change considerably.
Kees Vuik, March 20, 2007 23 – p.23/29
Delft University of Technology
Geometry oil flow problem
700
710
720
730
740
750
12601270
12801290
13001310
1320-6
-5
-4
-3
-2
-1
0
10
10-7
10-4
10-7
Permeability
Sandstone
Shale
Shale
Sandstone/Shale
Composition
Kees Vuik, March 20, 2007 24 – p.24/29
Delft University of Technology
Results oil flow problem
Varying σshale
σ ICCG DICCG
λmin iter λmin iter
10−3 1.5 · 10−2 26 6.9 · 10−2 2010−5 2.2 · 10−4 59 7.7 · 10−2 2010−7 2.3 · 10−6 82 7.7 · 10−2 20
Varying accuracy
accuracy ICCG DICCG
iter CPU iter CPU
10−5 82 18.9 20 6.310−3 78 18.0 12 4.110−1 75 17.2 2 1.2
Kees Vuik, March 20, 2007 25 – p.25/29
Delft University of Technology
A groundwater flow problem
The pressure in groundwater satisfies the equation:
−∇ · (A∇u) = F, (1)
where the coefficients and geometry of the problem are:
u=0
u=0
F=100
4
A=10-5
A=102
u=1 u=1A=10
Kees Vuik, March 20, 2007 26 – p.26/29
Delft University of Technology
A groundwater flow problem
The low permeable layer (A = 10−5) and the jump in permeabilitiesbetween the two sand sections lead to a ’small’ eigenvalue.
0 6810
-10
10-8
10-6
10-4
10-2
100
102
104
0 3010
-10
10-8
10-6
10-4
10-2
100
102
104
λ 1
λ 2
error
error
approximatederror
errorapproximated
residualresidual
ICCG DICCG
Kees Vuik, March 20, 2007 27 – p.27/29
Delft University of Technology
5. Conclusions
• DICCG is a robust and efficient method to solve diffusionproblems with discontinuous coefficients.
• The choice of the projection vectors is important for the successof a projection method.
• For layered problems the physical deflation vectors are theoptimal choice for the projection vectors.
• For many problems a second level preconditioner (Deflation)saves a lot of CPU time.
Kees Vuik, March 20, 2007 28 – p.28/29
Delft University of Technology
Further information
• http://ta.twi.tudelft.nl/nw/users/vuik/pub_it_def.html
• C. Vuik, A. Segal and J.A. MeijerinkAn efficient preconditioned CG method for the solution of a classof layered problems with extreme contrasts in the coefficientsJ. Comp. Phys., 152, pp. 385-403, 1999.
• J. Frank and C. VuikOn the construction of deflation-based preconditionersSIAM Journal on Scientific Computing, 23, pp. 442–462, 2001
• R. Nabben and C. VuikA comparison of Deflation and Coarse Grid Correction applied toporous media flowSIAM J. on Numerical Analysis, 42, pp. 1631-1647, 2004
• R. Nabben and C. VuikA comparison of Deflation and the Balancing preconditionerSIAM Journal on Scientific Computing, 27, pp. 1742-1759, 2006
Kees Vuik, March 20, 2007 29 – p.29/29