Skip to content

Abort CGSolver when the defect is invalid

Jö Fahlke requested to merge feature/abort-on-invalid-defect into master

The first commit introduces the exception SolverAbort, derived from ISTLError.

The second commit makes CGSolver abort by throwing SolverAbort when the defect becomes invalid (infinite or NaN). The check is done in every iteration before the convergence check.

These two commits fix #12 (closed).

The third and fourth commit make BiCGStab and GMRes throw SolverAbort when they detect a breakdown. SolverAbort seemed more specific when the ISTLError they were throwing before.

The fifth commit documents when SolverAbort is thrown at the moment.

The sixth commit adds a unit tests that tries to trigger SolverAbort and makes sure that it is actually thrown. It does this for the NaN-check in CGSolver and for the "abs(h) < EPSILON"-check in BiCGSTABSolver -- there a more conditions in BiCGSTABSolver and RestartedGMResSolver that throw, but I don't know how to trigger them.

Merge request reports