Biconjugate gradient stabilized method
From CFD-Wiki
Biconjugate gradient stabilized method
Biconjugate gradient stabilized 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, phat, s, shat, t, v, rtilde
- Allocate temerary reals rho_1, rho_2 , alpha, beta, omega
-
- r := b - A
x
- rtilde = r
-
- for i := 1 step 1 until max_itr do
- rho_1 = rtilde
r
- if i = 1 then p := r else
- beta = (rho_1/rho_2) * (alpha/omega)
- p = r + beta * (p - omega * v)
- beta = (rho_1/rho_2) * (alpha/omega)
- end if
- solve (M
phat = p )
- v = A
phat
- alpha = rho_1 / (rtilde
v)
- s = r - alpha * v
- solve (M
shat = s )
- t = A * shat;
- omega = (t
s) / (t
t)
- x = x + alpha * phat + omega * shat
- r = s - omega * t
- rho_2 = rho_1
- rho_1 = rtilde
- end (i-loop)
-
- deallocate all temp memory
- return TRUE