template<typename SolverType, typename MatrixType, typename VectorType>
void
check_solve( SolverType &solver,
+ const unsigned int solver_number,
const SolverControl &solver_control,
const MatrixType &A,
std::vector<VectorType> &u, std::vector<PetscScalar > &v)
deallog << "Exception: " << e.get_exc_name() << std::endl;
}
- deallog << "Solver stopped after " << solver_control.last_step()
- << " iterations" << std::endl;
+ switch (solver_number)
+ {
+ case 1:
+ check_solver_within_range ((void)true,
+ solver_control.last_step(),
+ 5,5);
+ break;
+ case 2:
+ check_solver_within_range ((void)true,
+ solver_control.last_step(),
+ 24,24);
+ break;
+ case 3:
+ check_solver_within_range ((void)true,
+ solver_control.last_step(),
+ 21,21);
+ break;
+ case 4:
+ check_solver_within_range ((void)true,
+ solver_control.last_step(),
+ 123,128);
+ break;
+ case 5:
+ check_solver_within_range ((void)true,
+ solver_control.last_step(),
+ 137,138);
+ break;
+ case 6:
+ check_solver_within_range ((void)true,
+ solver_control.last_step(),
+ 50,51);
+ break;
+ default:
+ Assert (false, ExcNotImplemented());
+ }
deallog << "Eigenvalues:";
for (unsigned int i = 0; i < v.size(); i++)
{
SLEPcWrappers::SolverKrylovSchur solver(control);
- check_solve (solver, control, A,u,v);
+ check_solve (solver, 1, control, A,u,v);
}
{
SLEPcWrappers::SolverArnoldi solver(control);
- check_solve (solver, control, A,u,v);
+ check_solve (solver, 2, control, A,u,v);
}
{
SLEPcWrappers::SolverLanczos solver(control);
- check_solve (solver, control, A,u,v);
+ check_solve (solver, 3, control, A,u,v);
}
{
SLEPcWrappers::SolverGeneralizedDavidson solver(control);
- check_solve (solver, control, A,u,v);
+ check_solve (solver, 4, control, A,u,v);
}
{
SLEPcWrappers::SolverGeneralizedDavidson::AdditionalData data(true);
SLEPcWrappers::SolverGeneralizedDavidson solver(control,PETSC_COMM_SELF,data);
- check_solve (solver, control, A,u,v);
+ check_solve (solver, 5, control, A,u,v);
}
// set extra settings for JD; Otherwise, at least on OSX,
PETScWrappers::set_option_value("-st_ksp_max_it", "10");
{
SLEPcWrappers::SolverJacobiDavidson solver(control);
- check_solve (solver, control, A,u,v);
+ check_solve (solver, 6, control, A,u,v);
}
}
DEAL::Size 31 Unknowns 30
DEAL::
DEAL::Solver type: N6dealii13SLEPcWrappers17SolverKrylovSchurE
-DEAL::Solver stopped after 5 iterations
+DEAL::Solver stopped within 5 - 5 iterations
DEAL::Eigenvalues: 3.98974, 3.95906, 3.90828, 3.83792
DEAL::
DEAL::Solver type: N6dealii13SLEPcWrappers13SolverArnoldiE
-DEAL::Solver stopped after 24 iterations
+DEAL::Solver stopped within 24 - 24 iterations
DEAL::Eigenvalues: 3.98974, 3.95906, 3.90828, 3.83792
DEAL::
DEAL::Solver type: N6dealii13SLEPcWrappers13SolverLanczosE
-DEAL::Solver stopped after 21 iterations
+DEAL::Solver stopped within 21 - 21 iterations
DEAL::Eigenvalues: 3.98974, 3.95906, 3.90828, 3.83792
DEAL::
DEAL::Solver type: N6dealii13SLEPcWrappers25SolverGeneralizedDavidsonE
-DEAL::Solver stopped after 123 iterations
+DEAL::Solver stopped within 123 - 128 iterations
DEAL::Eigenvalues: 3.98974, 3.95906, 3.90828, 3.83792
DEAL::
DEAL::Solver type: N6dealii13SLEPcWrappers25SolverGeneralizedDavidsonE
-DEAL::Solver stopped after 138 iterations
+DEAL::Solver stopped within 137 - 138 iterations
DEAL::Eigenvalues: 3.98974, 3.95906, 3.90828, 3.83792
DEAL::
DEAL::Solver type: N6dealii13SLEPcWrappers20SolverJacobiDavidsonE
-DEAL::Solver stopped after 50 iterations
+DEAL::Solver stopped within 50 - 51 iterations
DEAL::Eigenvalues: 3.98974, 3.95906, 3.90828, 3.83792
DEAL::