diff --git a/dune/istl/istlexception.hh b/dune/istl/istlexception.hh index d72f6feb770b6c56455bafc15024c1f4d830a89c..ffe4970706baab5bb447461bfa3e0f28c6b4cb34 100644 --- a/dune/istl/istlexception.hh +++ b/dune/istl/istlexception.hh @@ -33,6 +33,13 @@ namespace Dune { : public BCRSMatrixError {}; + //! Thrown when a solver aborts due to some problem. + /** + * Problems that may cause the solver to abort include a NaN detected during + * the convergence check (which may be caused by invalid input data). + */ + class SolverAbort : public ISTLError {}; + /** @} end documentation */ } // end namespace diff --git a/dune/istl/solver.hh b/dune/istl/solver.hh index 8898d9adfc26acc7958d6eb208a5ba3b2a502267..d010fe09b679c85d0607e7eaaba713aadb6f87be 100644 --- a/dune/istl/solver.hh +++ b/dune/istl/solver.hh @@ -95,6 +95,9 @@ namespace Dune \param x The left hand side to store the result in. \param b The right hand side \param res Object to store the statistics about applying the operator. + + \throw SolverAbort When the solver detects a problem and cannot + continue */ virtual void apply (X& x, Y& b, InverseOperatorResult& res) = 0; @@ -107,6 +110,9 @@ namespace Dune \param b The right hand side \param reduction The minimum defect reduction to achieve. \param res Object to store the statistics about applying the operator. + + \throw SolverAbort When the solver detects a problem and cannot + continue */ virtual void apply (X& x, Y& b, double reduction, InverseOperatorResult& res) = 0;