From: Wolfgang Bangerth Date: Mon, 7 Dec 2020 01:29:20 +0000 (-0700) Subject: Housekeeping. X-Git-Tag: v9.3.0-rc1~795^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F11333%2Fhead;p=dealii.git Housekeeping. --- diff --git a/source/lac/slepc_solver.cc b/source/lac/slepc_solver.cc index 87fe772326..a65a0962fc 100644 --- a/source/lac/slepc_solver.cc +++ b/source/lac/slepc_solver.cc @@ -57,6 +57,8 @@ namespace SLEPcWrappers // randomly. } + + SolverBase::~SolverBase() { if (eps != nullptr) @@ -69,6 +71,8 @@ namespace SLEPcWrappers } } + + void SolverBase::set_matrices(const PETScWrappers::MatrixBase &A) { @@ -77,6 +81,8 @@ namespace SLEPcWrappers AssertThrow(ierr == 0, ExcSLEPcError(ierr)); } + + void SolverBase::set_matrices(const PETScWrappers::MatrixBase &A, const PETScWrappers::MatrixBase &B) @@ -86,6 +92,8 @@ namespace SLEPcWrappers AssertThrow(ierr == 0, ExcSLEPcError(ierr)); } + + void SolverBase::set_transformation( SLEPcWrappers::TransformationBase &transformation) @@ -98,10 +106,10 @@ namespace SLEPcWrappers # 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( &transformation)) @@ -112,6 +120,8 @@ namespace SLEPcWrappers # endif } + + void SolverBase::set_target_eigenvalue(const PetscScalar &this_target) { @@ -122,6 +132,8 @@ namespace SLEPcWrappers AssertThrow(ierr == 0, ExcSLEPcError(ierr)); } + + void SolverBase::set_which_eigenpairs(const EPSWhich eps_which) { @@ -130,6 +142,8 @@ namespace SLEPcWrappers AssertThrow(ierr == 0, ExcSLEPcError(ierr)); } + + void SolverBase::set_problem_type(const EPSProblemType eps_problem) { @@ -137,6 +151,8 @@ namespace SLEPcWrappers AssertThrow(ierr == 0, ExcSLEPcError(ierr)); } + + void SolverBase::solve(const unsigned int n_eigenpairs, unsigned int *n_converged) { @@ -231,6 +247,8 @@ namespace SLEPcWrappers } } + + void SolverBase::get_eigenpair(const unsigned int index, PetscScalar & eigenvalues, @@ -243,6 +261,7 @@ namespace SLEPcWrappers } + void SolverBase::get_eigenpair(const unsigned int index, double & real_eigenvalues, @@ -275,6 +294,8 @@ namespace SLEPcWrappers # endif } + + void SolverBase::get_solver_state(const SolverControl::State state) { @@ -300,6 +321,8 @@ namespace SLEPcWrappers } } + + /* ---------------------- SolverControls ----------------------- */ SolverControl & SolverBase::control() const @@ -307,6 +330,8 @@ namespace SLEPcWrappers return solver_control; } + + int SolverBase::convergence_test( EPS /*eps */, @@ -324,6 +349,8 @@ namespace SLEPcWrappers return 0; } + + /* ---------------------- SolverKrylovSchur ------------------------ */ SolverKrylovSchur::SolverKrylovSchur(SolverControl & cn, const MPI_Comm & mpi_communicator, @@ -336,12 +363,16 @@ namespace SLEPcWrappers 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) @@ -361,11 +392,14 @@ namespace SLEPcWrappers } + /* ---------------------- Lanczos ------------------------ */ SolverLanczos::AdditionalData::AdditionalData(const EPSLanczosReorthogType r) : reorthog(r) {} + + SolverLanczos::SolverLanczos(SolverControl & cn, const MPI_Comm & mpi_communicator, const AdditionalData &data) @@ -379,6 +413,8 @@ namespace SLEPcWrappers AssertThrow(ierr == 0, ExcSLEPcError(ierr)); } + + /* ----------------------- Power ------------------------- */ SolverPower::SolverPower(SolverControl & cn, const MPI_Comm & mpi_communicator, @@ -390,12 +426,16 @@ namespace SLEPcWrappers 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, @@ -413,6 +453,8 @@ namespace SLEPcWrappers } } + + /* ------------------ Jacobi Davidson -------------------- */ SolverJacobiDavidson::SolverJacobiDavidson(SolverControl & cn, const MPI_Comm &mpi_communicator, @@ -424,6 +466,8 @@ namespace SLEPcWrappers AssertThrow(ierr == 0, ExcSLEPcError(ierr)); } + + /* ---------------------- LAPACK ------------------------- */ SolverLAPACK::SolverLAPACK(SolverControl & cn, const MPI_Comm & mpi_communicator,