16 Preconditioning
The general idea underlying any preconditioning procedure for iterative solvers is to modify the (ill-conditioned) system
Ax = b in such a way that we obtain an equivalent system Aˆxˆ = bˆ for which the iterative method converges faster. A standard approach is to use a nonsingular matrix M, and rewrite the system as
M −1Ax = M −1b.
The preconditioner M needs to be chosen such that the matrix Aˆ = M −1A is better conditioned for the conjugate gradient method, or has better clustered eigenvalues for the GMRES method.
16.1 Preconditioned Conjugate Gradients We mentioned earlier that the number of iterations required for the conjugate gradient algorithm to converge is proportional to pκ(A). Thus, for poorly conditioned matrices, convergence will be very slow. Thus, clearly we will want to choose M such that κ(Aˆ) < κ(A). This should result in faster convergence. How do we find Aˆ, xˆ, and bˆ? In order to ensure symmetry and positive definiteness of Aˆ we let M −1 = LLT (44) with a nonsingular m × m matrix L. Then we can rewrite
Ax = b ⇐⇒ M −1Ax = M −1b ⇐⇒ LT Ax = LT b ⇐⇒ LT AL L−1x = LT b . | {z } | {z } |{z} =Aˆ =xˆ =bˆ The symmetric positive definite matrix M is called splitting matrix or preconditioner, and it can easily be verified that Aˆ is symmetric positive definite, also. One could now formally write down the standard CG algorithm with the new “hat- ted” quantities. However, the algorithm is more efficient if the preconditioning is incorporated directly into the iteration. To see what this means we need to examine every single line in the CG algorithm. We start by looking at the new residual:
T T −1 T T T rˆn = bˆ − Aˆxˆn = L b − (L AL)(L xn) = L b − L Axn = L rn, and also define the following abbreviations
−1 pˆn = L pn, −1 r˜n = M rn.
122 Now we can consider how this transforms the CG algorithm (for the hatted quan- −1 tities). The initialization becomes xˆ0 = L x0 = 0 and
T T rˆ0 = bˆ ⇐⇒ L r0 = L b ⇐⇒ r0 = b.
The initial search direction turns out to be
−1 T pˆ0 = rˆ0 ⇐⇒ L p0 = L r0 −1 ⇐⇒ p0 = M r0 = r˜0, where we have used the definition of the preconditioner M. The step lengthα ˆ trans- forms as follows: T T ˆ αˆn = rˆn−1rˆn−1 / pˆn−1Apˆn−1 T T T −1 T T −1 = L rn−1 L rn−1 / L pn−1 L AL L pn−1 T T T −T T −1 = rn−1LL rn−1 / pn−1L L ALL pn−1 T T T = r LL rn−1 / p Apn−1 n−1 |{z} n−1 =M −1 T T = rn−1r˜n−1 / pn−1Apn−1 . The approximate solution is updated according to
−1 −1 −1 xˆn = xˆn−1 +α ˆnpˆn−1 ⇐⇒ L xn = L xn−1 +α ˆnL pn−1 ⇐⇒ xn = xn−1 +α ˆnpn−1.
The residuals are updated as ˆ T T T −1 rˆn = rˆn−1 − αˆnApˆn−1 ⇐⇒ L rn = L rn−1 − αˆn(L AL)L pn−1 ⇐⇒ rn = rn−1 − αˆnApn−1.
The gradient correction factor β transforms as follows:
ˆ T T βn = rˆn rˆn / rˆn−1rˆn−1 T T T T T T = L rn L rn / L rn−1 L rn−1 T T T T = r LL rn / r LL rn−1 n |{z} n−1 |{z} =M −1 =M −1 T T = rn r˜n / rn−1r˜n−1 . Finally, for the new search direction we have ˆ −1 T ˆ −1 pˆn = rˆn + βnpˆn−1 ⇐⇒ L pn = L rn + βnL pn−1 −1 ⇐⇒ pn = M rn + βˆnpn−1
⇐⇒ pn = r˜n + βˆnpn−1, where we have multiplied by L and used the definition of M in the penultimate step. The resulting algorithm is given by
123 Algorithm (Preconditioned Conjugate Gradient)
Take x0 = 0, r0 = b
Solve Mr˜0 = r0 for r˜0
Let p0 = r˜0 for n = 1, 2, 3,...
Compute a step length