From ea17d16b1750b907d78d0ee5541bc93e80ed831b Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 15 Dec 2015 11:33:14 +0100 Subject: [PATCH] extend SLEPc unit test to check different preconditioners in KrylovSchur solver --- tests/slepc/step-36_parallel.cc | 45 ++++++++++++++++--- ...petsc=true.with_slepc=true.mpirun=3.output | 24 ++++++++++ 2 files changed, 64 insertions(+), 5 deletions(-) diff --git a/tests/slepc/step-36_parallel.cc b/tests/slepc/step-36_parallel.cc index ab8ae7bed1..64cffb4854 100644 --- a/tests/slepc/step-36_parallel.cc +++ b/tests/slepc/step-36_parallel.cc @@ -36,7 +36,8 @@ const unsigned int dim = 2;//run in 2d to save time const double eps = 1e-10; -void test (std::string solver_name) +void test (std::string solver_name, + std::string preconditioner_name) { const unsigned int global_mesh_refinement_steps = 5; const unsigned int number_of_eigenvalues = 5; @@ -192,10 +193,36 @@ void test (std::string solver_name) // test SLEPc by { - PETScWrappers::PreconditionJacobi preconditioner(mpi_communicator); + PETScWrappers::PreconditionerBase *preconditioner; + + dealii::deallog<set_transformation(spectral_transformation); - //eigensolver->set_initial_vector(eigenfunctions[0]); + eigensolver->set_initial_vector(eigenfunctions[0]); eigensolver->set_which_eigenpairs (EPS_SMALLEST_REAL); eigensolver->set_problem_type (EPS_GHEP); @@ -254,9 +282,14 @@ void test (std::string solver_name) eigenfunctions, eigenfunctions.size()); + dealii::deallog << "outer iterations: "<< solver_control.last_step ()<