Skip to content
Snippets Groups Projects
Commit 40911856 authored by Jö Fahlke's avatar Jö Fahlke
Browse files

[SolverAbort] Exception to be thrown by solvers when they cannot continue.

parent 969fa8a4
No related branches found
No related tags found
1 merge request!36Abort CGSolver when the defect is invalid
...@@ -33,6 +33,13 @@ namespace Dune { ...@@ -33,6 +33,13 @@ namespace Dune {
: public BCRSMatrixError : 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 documentation */
} // end namespace } // end namespace
......
...@@ -95,6 +95,9 @@ namespace Dune ...@@ -95,6 +95,9 @@ namespace Dune
\param x The left hand side to store the result in. \param x The left hand side to store the result in.
\param b The right hand side \param b The right hand side
\param res Object to store the statistics about applying the operator. \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; virtual void apply (X& x, Y& b, InverseOperatorResult& res) = 0;
...@@ -107,6 +110,9 @@ namespace Dune ...@@ -107,6 +110,9 @@ namespace Dune
\param b The right hand side \param b The right hand side
\param reduction The minimum defect reduction to achieve. \param reduction The minimum defect reduction to achieve.
\param res Object to store the statistics about applying the operator. \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; virtual void apply (X& x, Y& b, double reduction, InverseOperatorResult& res) = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment