WE
weebsuryansh/IterativeMethods
We implemented 4 iterative methods in C++: Jacobi, Gauss-Seidel, Conjugate Gradient and GMRES
Comparison of Stationary and Non-Stationary Iterative Methods
This project implements and compares stationary and non-stationary iterative methods for solving large sparse linear systems. The implemented methods are:
- Jacobi Method (Stationary)
- Gauss-Seidel Method (Stationary)
- Conjugate Gradient (CG) Method (Non-Stationary)
- Generalized Minimal Residual (GMRES) Method (Non-Stationary)
The implementation is written in C++, utilizing the Eigen library for basic matrix operations and functionalities.
Features
- Implementation of stationary and non-stationary iterative solvers.
- Comparative analysis of performance metrics:
- Convergence speed.
- Accuracy of solutions.
- Computational efficiency.
- Designed to handle large sparse matrices.
Prerequisites
To run this project, ensure the following are installed on your system:
- C++ Compiler (e.g., g++, clang++)
- CMake (For building the project)
- Eigen (Matrix library)
Building and Running
Clone the Repository
git clone https://github.com/weebsuryansh/IterativeMethods
cd IterativeMethodsBuild the project
mkdir build
cd build
cmake ..
makeRunning the executable
.\IterativeMethodsInput format
The code uses 3x3, 4x4, 5x5 and 6x6 matrices that can be edited by going into the \data directory.
The matrices used are in .mtx format.
Result and Analysis
Result and analysis can be found in Iterative_Methods.pdf.
Project Structure
IterativeMethods/
├── CMakeLists.txt # Build configuration
├── Eigen/ # Library used for basic matrix operations
├── data/ # Example input files (matrices and vectors)
├── build/ # Directory for compiled files (generated)
├── Iterative_Methods.pdf # The research paper entailing the result and analysis
└── README.md # Project documentation