Commit 96082079 authored by Backofen, Rainer's avatar Backofen, Rainer
Browse files

break if Umfpack does not reach tolerance

parent e27212ed
...@@ -60,8 +60,9 @@ namespace AMDiS { ...@@ -60,8 +60,9 @@ namespace AMDiS {
template< typename Vector> template< typename Vector>
int solve(const Matrix& A, Vector& x, Vector& b) int solve(const Matrix& A, Vector& x, Vector& b)
{ {
if (!solver) { FUNCNAME("(UmfPackSolver.h)::solve()");
if (!symmetric_strategy) if (!solver) {
if (!symmetric_strategy)
solver = new mtl::matrix::umfpack::solver<matrix_type>(A); solver = new mtl::matrix::umfpack::solver<matrix_type>(A);
else else
solver = new mtl::matrix::umfpack::solver<matrix_type>(A, UMFPACK_STRATEGY_SYMMETRIC); solver = new mtl::matrix::umfpack::solver<matrix_type>(A, UMFPACK_STRATEGY_SYMMETRIC);
...@@ -84,7 +85,7 @@ namespace AMDiS { ...@@ -84,7 +85,7 @@ namespace AMDiS {
oem.setErrorCode(code); oem.setErrorCode(code);
std::cout << "UmfPackSolver: ||b-Ax|| = " << residual << "\n"; std::cout << "UmfPackSolver: ||b-Ax|| = " << residual << "\n";
if (residual > oem.getTolerance()) { if (residual > oem.getTolerance()) {
WARNING("Tolerance tol=%e could not be reached!\n", oem.getTolerance()); ERROR_EXIT("Tolerance tol=%e could not be reached!\n Set tolerance by '->solver->tolerance:' \n", oem.getTolerance());
} }
} }
return code; return code;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment