STFC Website

part of UK Research & Innovation

Version 1.1.0

22nd February 2005

MI23: Unsymmetric system: CGS (conjugate gradient squared) method

This routine uses the CGS (Conjugate Gradient Squared) method to solve the \(n \times n\) unsymmetric linear system \(\mathbf{Ax} = \mathbf{b}\), optionally using preconditioning. If \(\mathbf{P} _ L\), \(\mathbf{P} _R\) are the preconditioning matrices, the routine actually solves the preconditioned system

\[\bar{\mathbf{A}} \bar{\mathbf{x}} = \bar{\mathbf{b}},\]

with \(\bar{\mathbf{A}} = \mathbf{P} _L \mathbf{A}\mathbf{P} _R\) and \(\mathbf{b} BAR = \mathbf{P} _L \mathbf{b}\) and recovers the solution \(\mathbf{x} = \mathbf{P} _ {\mathrm{ R}} \bar{\mathbf{x}}\). If \(\mathbf{P} _L = \mathbf{I}\), preconditioning is said to be from the right, if \(\mathbf{P} _R = \mathbf{I}\), it is said to be from the left, and otherwise it is from both sides. Reverse communication is used for preconditioning operations and matrix-vector products of the form \(\mathbf{Az}\).