The matrix c may be a cholesky factor of m ie m cct

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ure to ~ ~ Aw = b (9.3.17a) where ~ A = C;1 AC;T ~ b = C;1 b w = CT x (9.3.17b) 42 Solution Techniques for Elliptic Problems =0 while not converged do = (~( ) )T ~( ) =(~ ( ) )T Ap( ) r r p ~~ ( +1) = w( ) + p( ) ~ w ( +1) = ~( ) ; Ap( ) ~~ ~ r r ( +1) )T ~( +1) =(~( ) )T ~( ) = (~ r r rr ~ ~ p( +1) = ~( +1) + p( ) r = +1 end while Figure 9.3.4: Main loop of the conjugate gradient algorithm applied to (9.3.17). The main loop of the conjugate gradient algorithm of Figure 9.3.3 is reproduced in Figure 9.3.4 for the system (9.3.17). In this algorithm ~( ) = b ; Aw( ) = C;1(b ; Ax( ) ) = C;1 r( ) r ~~ (9.3.18a) ~ p( ) = CT p( ) : (9.3.18b) Also Using (9.3.18), let us rewrite the conjugate gradient algorithm of Figure 9.3.4 in terms of the original variables as (~( ))T ~( ) = (r( ) )T C;T C;1r( ) = (r( ) )T M;1 r( ) rr (9.3.19a) ~~ Ap( ) = C;1 AC;T CT p( ) = C;1Ap( ) (9.3.19b) (~ ( ) )T Ap( ) = (p( ) )T CC;1Ap( ) = (p( ) )T Ap( ) p ~~ (9.3.19c) The PCG algorithm written in terms of the original variables appears in Figure 9.3.5. Some comments follow: 1. The PCG algorithm does not involve C or a Cholesky factorization of M. Thus, a PCG algorithm with the left preconditioning (9.3.15) would be identical. The PCG algorithm with the right preconditioning also gives the same sequence of operations ( 4], Section 9.2). 9.3. Conjugate Gradient Methods 43 procedure pcg r(0) = b ; Ax(0) Solve Mz(0) = r(0) p(0) = z(0) =0 while not converged do = (r( ))T z( ) =(p( ) )T Ap( ) x( +1) = x( ) + p( ) r( +1) = r( ) ; Ap( ) Solve Mz( +1) = r( +1) = (r( +1) )T z( +1) =(r( ))T z( ) ( +1) = z( +1) + p( ) p = +1 end while Figure 9.3.5: PCG algorithm. 2. Rather than compute M;1, it is more e cient to solve Mz( ) = r( ) for z( ) . ~ 3. The original conjugate gradient alogorithm of Figure 9.3.3 would set p(0) = ~(0) . r Using (9.3.18a, 9.3.18b) CT p(0) = C;1r(0) or, using (9.3.16c) p(0) = C;T C;1 r(0) = M;1 r(0) = z(0) : This explains the choice of p(0) in the initial stages of the algorithm. The subsequent calculation of p(...
View Full Document

This document was uploaded on 03/16/2014 for the course CSCI 6840 at Rensselaer Polytechnic Institute.

Ask a homework question - tutors are online