16 #include <deal.II/lac/slepc_spectral_transformation.h> 18 #ifdef DEAL_II_WITH_SLEPC 20 # include <deal.II/lac/slepc_solver.h> 21 # include <deal.II/lac/petsc_matrix_base.h> 22 # include <deal.II/lac/petsc_vector_base.h> 23 # include <deal.II/lac/petsc_vector.h> 28 # include <petscversion.h> 30 DEAL_II_NAMESPACE_OPEN
36 int ierr = STCreate(mpi_communicator, &
st);
37 AssertThrow (ierr == 0, SolverBase::ExcSLEPcError(ierr));
44 int ierr = STDestroy(&
st);
45 AssertThrow (ierr == 0, SolverBase::ExcSLEPcError(ierr));
51 int ierr = STSetMatMode(
st,mode);
52 AssertThrow (ierr == 0, SolverBase::ExcSLEPcError(ierr));
58 AssertThrow (ierr == 0, SolverBase::ExcSLEPcError(ierr));
66 shift_parameter (shift_parameter)
76 ierr = STSetType (
st, const_cast<char *>(STSHIFT));
77 AssertThrow (ierr == 0, SolverBase::ExcSLEPcError(ierr));
80 AssertThrow (ierr == 0, SolverBase::ExcSLEPcError(ierr));
88 shift_parameter (shift_parameter)
98 #if DEAL_II_PETSC_VERSION_LT(3,1,0) 99 ierr = STSetType (
st, const_cast<char *>(STSINV));
101 ierr = STSetType (
st, const_cast<char *>(STSINVERT));
103 AssertThrow (ierr == 0, SolverBase::ExcSLEPcError(ierr));
106 AssertThrow (ierr == 0, SolverBase::ExcSLEPcError(ierr));
114 shift_parameter (shift_parameter)
123 #if DEAL_II_PETSC_VERSION_LT(3,5,0) 125 ierr = STSetType (
st, const_cast<char *>(STFOLD));
127 AssertThrow (ierr == 0, SolverBase::ExcSLEPcError(ierr));
131 AssertThrow (ierr == 0, SolverBase::ExcSLEPcError(ierr));
136 ExcMessage (
"Folding transformation has been removed in SLEPc 3.5.0 and newer." 137 "You cannot use this transformation anymore."));
145 const double antishift_parameter)
147 shift_parameter (shift_parameter),
148 antishift_parameter (antishift_parameter)
158 int ierr = STSetType (
st, const_cast<char *>(STCAYLEY));
159 AssertThrow (ierr == 0, SolverBase::ExcSLEPcError(ierr));
162 AssertThrow (ierr == 0, SolverBase::ExcSLEPcError(ierr));
165 AssertThrow (ierr == 0, SolverBase::ExcSLEPcError(ierr));
170 DEAL_II_NAMESPACE_CLOSE
172 #endif // DEAL_II_WITH_SLEPC
::ExceptionBase & ExcMessage(std::string arg1)
std_cxx11::shared_ptr< SolverData > solver_data
#define AssertThrow(cond, exc)
#define Assert(cond, exc)