18 #ifndef __SLEPC_EIGEN_SOLVER_H 19 #define __SLEPC_EIGEN_SOLVER_H 26 #include "dolfin/common/types.h" 27 #include "dolfin/common/MPI.h" 28 #include "PETScObject.h" 37 class VectorSpaceBasis;
136 std::shared_ptr<const PETScMatrix> B);
140 std::shared_ptr<const PETScMatrix> B);
148 std::shared_ptr<const PETScMatrix> B);
154 void solve(std::size_t n);
199 p.
add<std::string>(
"problem_type");
200 p.
add<std::string>(
"spectrum");
201 p.
add<std::string>(
"solver");
202 p.
add<
double>(
"tolerance");
203 p.
add<
int>(
"maximum_iterations");
204 p.
add<std::string>(
"spectral_transform");
205 p.
add<
double>(
"spectral_shift");
206 p.
add<
bool>(
"verbose");
214 void read_parameters();
217 void set_problem_type(std::string type);
220 void set_spectral_transform(std::string transform,
double shift);
223 void set_spectrum(std::string solver);
226 void set_solver(std::string spectrum);
229 void set_tolerance(
double tolerance,
int maxiter);
void get_eigenpair(double &lr, double &lc, GenericVector &r, GenericVector &c, std::size_t i) const
Get ith eigenpair.
Definition: SLEPcEigenSolver.cpp:240
Definition: PETScVector.h:60
Common base class for DOLFIN variables.
Definition: Variable.h:35
std::string get_options_prefix() const
Definition: SLEPcEigenSolver.cpp:343
void solve()
Compute all eigenpairs of the matrix A (solve Ax = x)
Definition: SLEPcEigenSolver.cpp:153
Definition: SLEPcEigenSolver.h:118
void add(std::string key)
Definition: Parameters.h:128
void set_options_prefix(std::string options_prefix)
Definition: SLEPcEigenSolver.cpp:335
SLEPcEigenSolver(MPI_Comm comm)
Create eigenvalue solver.
Definition: SLEPcEigenSolver.cpp:32
Definition: VectorSpaceBasis.h:33
EPS eps() const
Return SLEPc EPS pointer.
Definition: SLEPcEigenSolver.cpp:540
static Parameters default_parameters()
Default parameter values.
Definition: SLEPcEigenSolver.h:196
void get_eigenvalue(double &lr, double &lc, std::size_t i) const
Get ith eigenvalue.
Definition: SLEPcEigenSolver.cpp:220
Definition: Parameters.h:94
~SLEPcEigenSolver()
Destructor.
Definition: SLEPcEigenSolver.cpp:135
std::size_t get_number_converged() const
Get the number of converged eigenvalues.
Definition: SLEPcEigenSolver.cpp:289
void set_operators(std::shared_ptr< const PETScMatrix > A, std::shared_ptr< const PETScMatrix > B)
Definition: SLEPcEigenSolver.cpp:142
Definition: PETScObject.h:33
void set_deflation_space(const VectorSpaceBasis &deflation_space)
Definition: SLEPcEigenSolver.cpp:297
void set_initial_space(const VectorSpaceBasis &initial_space)
Definition: SLEPcEigenSolver.cpp:316
This class defines a common interface for vectors.
Definition: GenericVector.h:47
void set_from_options() const
Set options from PETSc options database.
Definition: SLEPcEigenSolver.cpp:352
std::size_t get_iteration_number() const
Get the number of iterations used by the solver.
Definition: SLEPcEigenSolver.cpp:532