Conjugate Gradient Algorithm - 2023.2 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.2 English

For linear system \(Ax=b\) with given preconditioner matrix \(M\), the preconditioned conjugate gradient method is shown in the following equations.

(1)\[\begin{split}x_0 &= 0 \\ r_0 &= b-Ax_0 \\ z_0 &= M^{-1}r_0 \\ \rho_0 &= r_0^Tz_0 \\ \beta_k &= 0 \\\end{split}\]
\[\begin{split}while\ k<maxIter\ &AND\ ||r_{k}|| > tol*||b|| \\ p_{k} &= z_{k} + \beta_{k-1}p_{k-1} \\ \alpha_k&=\frac{\rho_k}{p_k^TAp_k} \\ x_{k+1} &= x_k+\alpha_kp_k \\ r_{k+1} &= r_k+\alpha_kAp_k \\ z_{k+1} &= M^{-1}r_{k+1} \\ \rho_{k+1} &= r_{k+1}^Tz_{k+1} \\ \beta_k &= \frac{\rho_{k+1}}{\rho_k} \\ k &= k+ 1 \\\end{split}\]