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

[BUG] ResidualStopCriterion fails if iterative solver is solved for zero vector. #720

Closed
wo80 opened this issue Aug 2, 2020 · 1 comment · Fixed by #1000
Closed

[BUG] ResidualStopCriterion fails if iterative solver is solved for zero vector. #720

wo80 opened this issue Aug 2, 2020 · 1 comment · Fixed by #1000
Labels

Comments

@wo80
Copy link

wo80 commented Aug 2, 2020

The comparision should actually be "less or equal". The following code will throw a NumericalBreakdownException:

var A = new DenseMatrix(2, 2, new double[] { 1, 2, 3, 4 });
var b = new DenseVector(2); // zero vector!
var x = new DenseVector(2);

var iterator = new Iterator<double>(new ResidualStopCriterion<double>(1e-5));
var solver = new BiCgStab();

solver.Solve(A, b, x, iterator, null);
@cdrnet
Copy link
Member

cdrnet commented Aug 1, 2023

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants