CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Wiki > Biconjugate gradient stabilized method

Biconjugate gradient stabilized method

From CFD-Wiki

(Difference between revisions)
Jump to: navigation, search
m
 
(10 intermediate revisions not shown)
Line 1: Line 1:
-
== Biconjugate gradient method ==
+
== Biconjugate gradient stabilized method ==
-
Biconjugate gradient method could be summarized as follows <br>
+
Biconjugate gradient stabilized method could be summarized as follows <br>
=== System of equation ===
=== System of equation ===
Line 8: Line 8:
A = coefficient matrix <br>
A = coefficient matrix <br>
-
M = the precondioning matrix constructued by matrix A <br>
+
M = the preconditioning matrix constructed by matrix A <br>
-
 
+
=== Algorithm ===
=== Algorithm ===
 +
----
 +
:  Allocate temperary vectors p, phat, s, shat, t, v, rtilde  <br>
 +
:  Allocate temerary reals rho_1, rho_2 , alpha, beta, omega <br>
 +
: <br>
 +
:  r := b - A<math>\cdot</math>x <br>
 +
:  rtilde = r <br>
 +
: <br>
 +
:  for i := 1 step 1 until max_itr do
 +
::      rho_1 = rtilde<math>\cdot</math>r <br>
 +
::      if i = 1 then p := r else <br>
 +
:::        beta = (rho_1/rho_2) * (alpha/omega)<br>
 +
:::        p = r + beta * (p - omega * v) <br>
 +
::      end if <br>
 +
::      solve (M<math>\cdot</math>phat  = p ) <br>
 +
::      v = A<math>\cdot</math>phat <br>
 +
::      alpha = rho_1 / (rtilde<math>\cdot</math>v) <br>
 +
::      s = r - alpha * v <br>
 +
::      solve (M<math>\cdot</math>shat = s ) <br>
 +
::      t = A<math>\cdot</math>shat;
 +
::      omega = (t<math>\cdot</math>s) / (t<math>\cdot</math>t) <br>
 +
::      x = x + alpha * phat + omega * shat <br>
 +
::      r = s - omega * t <br>
 +
::      rho_2 = rho_1 <br>
 +
:  end (i-loop)
 +
:  <br> 
 +
:  deallocate all temp memory <br>
 +
:  return TRUE <br>
 +
----
 +
 +
 +
== '''[[Sample code for BiCGSTAB - Fortran 90]]''' ==
 +
 +
=== Reference ===
 +
#'''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" [http://www.netlib.org/linalg/html_templates/node41.html | http://www.netlib.org/linalg/html_templates/]
 +
-
  Allocate temperary vectors p, phat, s, shat, t, v, rtilde  <br>
+
----
-
  Allocate temerary reals rho_1, rho_2 , alpha, beta, omega <br>
+
<i> Return to [[Numerical methods | Numerical Methods]] </i>
-
  r := b - A<math>\bullet</math>x <br>
+
-
  rtilde = r <br>
+
-
  for i := 1 step 1 until max_itr do
+
-
      rho_1 = rtilde<math>\bullet</math>r <br>
+
-
      if i = 1 then p := r else <br>
+
-
        beta = (rho_1/rho_2) * (alpha/omega)<br>
+
-
        p = r + beta * (p - omega * v) <br>
+
-
      end if <br>
+
-
      solve (M<math>\bullet</math>phat  = p ) <br>
+
-
      v = A<math>\bullet</math>phat <br>
+
-
      alpha = rho_1 / (rtilde<math>\bullet</math>v) <br>
+
-
      s = r - alpha * v <br>
+
-
      solve (M<math>\bullet</math>shat = s ) <br>
+
-
      t = A * shat;
+
-
      omega = (t<math>\bullet</math>s) / (t<math>\bullet</math>t) <br>
+
-
      x = x + alpha * phat + omega * shat <br>
+
-
      r = s - omega * t <br>
+
-
      rho_2 = rho_1 <br>
+
-
  end (i-loop)
+
-
 
+
-
  deallocate all temp memory <br>
+
-
  return TRUE <br>
+

Latest revision as of 17:01, 31 October 2016

Contents

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 preconditioning matrix constructed 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\cdotx
rtilde = r

for i := 1 step 1 until max_itr do
rho_1 = rtilde\cdotr
if i = 1 then p := r else
beta = (rho_1/rho_2) * (alpha/omega)
p = r + beta * (p - omega * v)
end if
solve (M\cdotphat = p )
v = A\cdotphat
alpha = rho_1 / (rtilde\cdotv)
s = r - alpha * v
solve (M\cdotshat = s )
t = A\cdotshat;
omega = (t\cdots) / (t\cdott)
x = x + alpha * phat + omega * shat
r = s - omega * t
rho_2 = rho_1
end (i-loop)

deallocate all temp memory
return TRUE


Sample code for BiCGSTAB - Fortran 90

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" | http://www.netlib.org/linalg/html_templates/



Return to Numerical Methods

My wiki