-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Describe the bug
Both the Jacobi and the Gauss-Seidel iterative methods only work for diagonally dominant matrices. Although being diagonally dominant is one of the assumptions for the iterative methods, is there still an iterative solution to them?
To Reproduce
Steps to reproduce the behavior:
- git clone the repository
- Compile the program
mkdir build && cd build
cmake ..
make
- Go to the binary output folder
cd ../output/bin
- Run the successful test with Jacobi method for 100 iterations
./iterativeSolver J ../../data/A_5.csv ../../data/b_5.csv 100 1 2
- Print out the correct result
cat ../../data/x_5.csv # they should be the same with the above
- Run the failing test with Jacobi method for 100 iterations
./iterativeSolver J ../../data/A_failed.csv ../../data/b_failed.csv 100 1 2
# the residual is diverging
- Print out the correct result
cat ../../data/x_failed.csv
# they are different from the above
Expected behavior
Jacobi method should be converging but it is not. The residual gradually diverges rather than becoming a tremendously large number suddenly suggesting that this is less of a numerical precision problem, but more of a systematic bug issue.
Desktop (please complete the following information):
- OS: Ubuntu 18.04.1 LTS (Bionic Beaver)
- Browser Chrome
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels