CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Wiki > Conjugate gradient method of Golub and van Loan

Conjugate gradient method of Golub and van Loan

From CFD-Wiki

Revision as of 20:35, 15 December 2005 by Tsaad (Talk | contribs)
Jump to: navigation, search

Contents

Conjugate gradient method

Conjugate gradient method could be summarized as follows

System of equation

For the given system of equation
Ax = b ;
b = source vector
x = solution variable for which we seek the solution
A = coefficient matrix

M = the precondioning matrix constructued by matrix A


Algorithm


Allocate temperary vectors p,z,q
Allocate temerary reals rho_0, rho_1 , alpha, beta

r := b - A\cdotx

for i := 1 step 1 until max_itr do
solve (M\cdotz = r )
beta := rho_0 / rho_1
p := z + beta\cdotp
q := A\bulletp
alpha = rho_0 / ( p\cdotq )
x := x + alpha\cdotp
r := r - alpha\cdotq
rho_1 = rho_0
end (i-loop)

deallocate all temp memory
return TRUE


Reference

  1. Richard Barret, Michael Berry, Tony F. Chan, James Demmel, June M. Donato, Jack Dongarra, Victor Eijihout, Roldan Pozo, Charles Romine, Henk Van der Vorst, "Templates for the Solution of Linear Systems: Building Blocks for Iterative Methods"
  2. Ferziger, J.H. and Peric, M. 2002. Computational Methods for Fluid Dynamics, 3rd rev. ed., Springer-Verlag, Berlin.



Return to Numerical Methods

My wiki