]> https://gitweb.dealii.org/ - dealii.git/commitdiff
impliment missing set_initial_vector() for SLEPc solvers
authorDenis Davydov <davydden@gmail.com>
Tue, 15 Dec 2015 10:20:11 +0000 (11:20 +0100)
committerDenis Davydov <davydden@gmail.com>
Tue, 29 Dec 2015 09:12:02 +0000 (10:12 +0100)
source/lac/slepc_solver.cc

index 23734380223bf99b6f6cee6026ab07c005ad5f69..0f2cc4dfa245b5dc50b3e33d037ac825c97bdec3 100644 (file)
@@ -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)
   {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.