Skip to content
Snippets Groups Projects
Commit 96082079 authored by Backofen, Rainer's avatar Backofen, Rainer
Browse files

break if Umfpack does not reach tolerance

parent e27212ed
No related branches found
No related tags found
No related merge requests found
......@@ -60,8 +60,9 @@ namespace AMDiS {
template< typename Vector>
int solve(const Matrix& A, Vector& x, Vector& b)
{
if (!solver) {
if (!symmetric_strategy)
FUNCNAME("(UmfPackSolver.h)::solve()");
if (!solver) {
if (!symmetric_strategy)
solver = new mtl::matrix::umfpack::solver<matrix_type>(A);
else
solver = new mtl::matrix::umfpack::solver<matrix_type>(A, UMFPACK_STRATEGY_SYMMETRIC);
......@@ -84,7 +85,7 @@ namespace AMDiS {
oem.setErrorCode(code);
std::cout << "UmfPackSolver: ||b-Ax|| = " << residual << "\n";
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;
......
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