Conjugate gradient method: solve linear system Ax=b, A=A^T, (Au,u) > 0 for any vector u from R^N, N - dimension of the matrix A. A - symmetric and positive-definite matrix. x - unknown vector. b - known vector.
Theory: please read paper by Jonathan Richard Shewchuk "An Introduction to the Conjugate Gradient Method Without the Agonizing Pain" on http://www.cs.cmu.edu/~quake-papers/painless-conjugate-gradient.pdf
Files:
- matrix.operations.omp.f90 - module for different matrix and vector operations.
- main.omp.f90 - CG method (OpenMP).
- main.mpi.f90 - CG method (MPI).
- CG.py - python code.