// randomly.
}
+
+
SolverBase::~SolverBase()
{
if (eps != nullptr)
}
}
+
+
void
SolverBase::set_matrices(const PETScWrappers::MatrixBase &A)
{
AssertThrow(ierr == 0, ExcSLEPcError(ierr));
}
+
+
void
SolverBase::set_matrices(const PETScWrappers::MatrixBase &A,
const PETScWrappers::MatrixBase &B)
AssertThrow(ierr == 0, ExcSLEPcError(ierr));
}
+
+
void
SolverBase::set_transformation(
SLEPcWrappers::TransformationBase &transformation)
# if DEAL_II_SLEPC_VERSION_GTE(3, 8, 0)
// see
// https://lists.mcs.anl.gov/mailman/htdig/petsc-users/2017-October/033649.html
- // From 3.8.0 SLEPc insists that when looking for smallest eigenvalues with
- // shift-and-invert users should (a) set target (b) use EPS_TARGET_MAGNITUDE
- // The former, however, needs to be applied to eps object and not spectral
- // transformation.
+ // From 3.8.0 onward, SLEPc insists that when looking for smallest
+ // eigenvalues with shift-and-invert, users should (a) set target,
+ // (b) use EPS_TARGET_MAGNITUDE. The former, however, needs to be
+ // applied to the 'eps' object and not the spectral transformation.
if (SLEPcWrappers::TransformationShiftInvert *sinv =
dynamic_cast<SLEPcWrappers::TransformationShiftInvert *>(
&transformation))
# endif
}
+
+
void
SolverBase::set_target_eigenvalue(const PetscScalar &this_target)
{
AssertThrow(ierr == 0, ExcSLEPcError(ierr));
}
+
+
void
SolverBase::set_which_eigenpairs(const EPSWhich eps_which)
{
AssertThrow(ierr == 0, ExcSLEPcError(ierr));
}
+
+
void
SolverBase::set_problem_type(const EPSProblemType eps_problem)
{
AssertThrow(ierr == 0, ExcSLEPcError(ierr));
}
+
+
void
SolverBase::solve(const unsigned int n_eigenpairs, unsigned int *n_converged)
{
}
}
+
+
void
SolverBase::get_eigenpair(const unsigned int index,
PetscScalar & eigenvalues,
}
+
void
SolverBase::get_eigenpair(const unsigned int index,
double & real_eigenvalues,
# endif
}
+
+
void
SolverBase::get_solver_state(const SolverControl::State state)
{
}
}
+
+
/* ---------------------- SolverControls ----------------------- */
SolverControl &
SolverBase::control() const
return solver_control;
}
+
+
int
SolverBase::convergence_test(
EPS /*eps */,
return 0;
}
+
+
/* ---------------------- SolverKrylovSchur ------------------------ */
SolverKrylovSchur::SolverKrylovSchur(SolverControl & cn,
const MPI_Comm & mpi_communicator,
AssertThrow(ierr == 0, ExcSLEPcError(ierr));
}
+
+
/* ---------------------- SolverArnoldi ------------------------ */
SolverArnoldi::AdditionalData::AdditionalData(
const bool delayed_reorthogonalization)
: delayed_reorthogonalization(delayed_reorthogonalization)
{}
+
+
SolverArnoldi::SolverArnoldi(SolverControl & cn,
const MPI_Comm & mpi_communicator,
const AdditionalData &data)
}
+
/* ---------------------- Lanczos ------------------------ */
SolverLanczos::AdditionalData::AdditionalData(const EPSLanczosReorthogType r)
: reorthog(r)
{}
+
+
SolverLanczos::SolverLanczos(SolverControl & cn,
const MPI_Comm & mpi_communicator,
const AdditionalData &data)
AssertThrow(ierr == 0, ExcSLEPcError(ierr));
}
+
+
/* ----------------------- Power ------------------------- */
SolverPower::SolverPower(SolverControl & cn,
const MPI_Comm & mpi_communicator,
AssertThrow(ierr == 0, ExcSLEPcError(ierr));
}
+
+
/* ---------------- Generalized Davidson ----------------- */
SolverGeneralizedDavidson::AdditionalData::AdditionalData(
bool double_expansion)
: double_expansion(double_expansion)
{}
+
+
SolverGeneralizedDavidson::SolverGeneralizedDavidson(
SolverControl & cn,
const MPI_Comm & mpi_communicator,
}
}
+
+
/* ------------------ Jacobi Davidson -------------------- */
SolverJacobiDavidson::SolverJacobiDavidson(SolverControl & cn,
const MPI_Comm &mpi_communicator,
AssertThrow(ierr == 0, ExcSLEPcError(ierr));
}
+
+
/* ---------------------- LAPACK ------------------------- */
SolverLAPACK::SolverLAPACK(SolverControl & cn,
const MPI_Comm & mpi_communicator,