Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iterative methods only work for diagonally dominant matrices #1

Open
Weiming-Hu opened this issue Sep 25, 2018 · 0 comments
Open

Iterative methods only work for diagonally dominant matrices #1

Weiming-Hu opened this issue Sep 25, 2018 · 0 comments

Comments

@Weiming-Hu
Copy link
Owner

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:

  1. git clone the repository
  2. Compile the program
mkdir build && cd build
cmake ..
make
  1. Go to the binary output folder
cd ../output/bin
  1. Run the successful test with Jacobi method for 100 iterations
./iterativeSolver J ../../data/A_5.csv ../../data/b_5.csv 100 1 2
  1. Print out the correct result
cat ../../data/x_5.csv # they should be the same with the above
  1. 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
  1. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant