jburkardt

CG\ Conjugate Gradient Solver for Linear Systems {#cg-conjugate-gradient-solver-for-linear-systems align=”center”} ============================================


CG is a C++ library which implements a simple version of the conjugate gradient (CG) method for solving a system of linear equations of the form A*x=b, suitable for situations in which the matrix A is positive definite (only real, positive eigenvalues) and symmetric.

Licensing: {#licensing align=”center”}

The computer code and data files made available on this web page are distributed under the GNU LGPL license.

Languages: {#languages align=”center”}

CG is available in a C version and a C++ version and a FORTRAN77 version and a FORTRAN90 version and a MATLAB version and a Python version.

CG_RC, a C++ library which implements the conjugate gradient (CG) method for solving a positive definite sparse linear system A*x=b, using reverse communication (RC).

SPARSE_DISPLAY, a C++ library which can read information defining a matrix of numbers and display the sparsity pattern or location of the nonzero elements using gnuplot. This operation is already available in the built-in MATLAB “spy” command.

WATHEN, a C++ library which compares storage schemes (full, banded, sparse triplet) and solution strategies (Linpack full, Linpack banded, conjugate gradient (CG)) for linear systems involving the Wathen matrix, which can arise when solving a problem using the finite element method (FEM).

Reference: {#reference align=”center”}

  1. Frank Beckman,\ The Solution of Linear Equations by the Conjugate Gradient Method,\ in Mathematical Methods for Digital Computers,\ edited by John Ralston, Herbert Wilf,\ Wiley, 1967,\ ISBN: 0471706892,\ LC: QA76.5.R3.
  2. Jonathan Shewchuk,\ An introduction to the conjugate gradient method without the agonizing pain, Edition 1.25, August 1994.

Source Code: {#source-code align=”center”}

Examples and Tests: {#examples-and-tests align=”center”}

List of Routines: {#list-of-routines align=”center”}

You can go up one level to the C++ source codes.


Last revised on 09 July 2014.