template <typename number>
void
-test()
+test(const unsigned int n_expected_steps)
{
const unsigned int n = 200;
Vector<number> rhs(n), sol(n);
<< accumulated_iterations << std::endl;
};
solver.connect_re_orthogonalization_slot(print_re_orthogonalization);
- solver.solve(matrix, sol, rhs, PreconditionIdentity());
+
+ check_solver_within_range(
+ solver.solve(matrix, sol, rhs, PreconditionIdentity()),
+ control.last_step(),
+ n_expected_steps - 3,
+ n_expected_steps + 3);
}
int
main()
{
initlog();
- deallog << std::setprecision(3);
+ deallog << std::setprecision(10);
deallog.push("double");
- test<double>();
+ test<double>(105);
deallog.pop();
deallog.push("float");
- test<float>();
+ test<float>(59);
deallog.pop();
}
-DEAL:double:GMRES::Starting value 14.1
-DEAL:double:GMRES::Convergence step 105 value 1.56e-13
-DEAL:float:GMRES::Starting value 14.1
-DEAL:float:GMRES::Convergence step 59 value 0.000110
+DEAL:double::Solver stopped within 102 - 108 iterations
+DEAL:float::Solver stopped within 56 - 62 iterations