From: Denis Davydov Date: Tue, 15 Dec 2015 10:20:11 +0000 (+0100) Subject: impliment missing set_initial_vector() for SLEPc solvers X-Git-Tag: v8.4.0-rc2~114^2~7 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac3c95e02376da233cd39947bf098dc21f96ab17;p=dealii.git impliment missing set_initial_vector() for SLEPc solvers --- diff --git a/source/lac/slepc_solver.cc b/source/lac/slepc_solver.cc index 2373438022..0f2cc4dfa2 100644 --- a/source/lac/slepc_solver.cc +++ b/source/lac/slepc_solver.cc @@ -97,6 +97,19 @@ namespace SLEPcWrappers AssertThrow (ierr == 0, SolverBase::ExcSLEPcError(ierr)); } + void + SolverBase::set_initial_vector (const PETScWrappers::VectorBase &this_initial_vector) + { + int ierr; + Vec vec = this_initial_vector; +#if DEAL_II_PETSC_VERSION_LT(3,1,0) + ierr = EPSSetInitialVector (eps, &vec); +#else + ierr = EPSSetInitialSpace (eps, 1, &vec); +#endif + AssertThrow (ierr == 0, ExcSLEPcError(ierr)); + } + void SolverBase::set_target_eigenvalue (const PetscScalar &this_target) {