also catch std::runtime_error, i.e. convergence of linear solver failed.

This commit is contained in:
Robert Kloefkorn 2014-10-14 15:18:36 +02:00
parent 1bda36b251
commit 40d851e89f

View File

@ -76,10 +76,14 @@ namespace Opm {
std::cout << "Overall linear iterations used: " << linearIterations << std::endl; std::cout << "Overall linear iterations used: " << linearIterations << std::endl;
} }
} }
catch (Opm::NumericalProblem) catch (Opm::NumericalProblem e) {
{ std::cerr << e.what() << std::endl;
// since linearIterations is < 0 this will restart the solver // since linearIterations is < 0 this will restart the solver
} }
catch (std::runtime_error e) {
std::cerr << e.what() << std::endl;
// also catch linear solver not converged
}
// (linearIterations < 0 means on convergence in solver) // (linearIterations < 0 means on convergence in solver)
if( linearIterations >= 0 ) if( linearIterations >= 0 )