19#include "libmesh/libmesh_config.h"
20#ifdef LIBMESH_HAVE_SLEPC
23#include "libmesh/eigen_solver.h"
24#include "libmesh/slepc_eigen_solver.h"
25#include "libmesh/solver_configuration.h"
26#include "libmesh/enum_eigen_solver_type.h"
41 _eigen_problem_type (
NHEP),
43 _is_initialized (false),
44 _solver_configuration(nullptr),
45 _close_matrix_before_solve(true)
57std::unique_ptr<EigenSolver<T>>
62 switch (solver_package)
65#ifdef LIBMESH_HAVE_SLEPC
67 return std::make_unique<SlepcEigenSolver<T>>(comm);
71 libmesh_error_msg(
"ERROR: Unrecognized eigen solver package: " << solver_package);
74 return std::unique_ptr<EigenSolver<T>>();
81 _solver_configuration = &solver_configuration;
98 _position_of_spectrum = target;
This class provides an interface to solvers for eigenvalue problems.
static std::unique_ptr< EigenSolver< T > > build(const Parallel::Communicator &comm_in, const SolverPackage solver_package=SLEPC_SOLVERS)
Builds an EigenSolver using the linear solver package specified by solver_package.
void set_position_of_spectrum(PositionOfSpectrum pos)
Sets the position of the spectrum.
virtual ~EigenSolver()
Destructor.
EigenSolver(const Parallel::Communicator &comm_in)
Constructor.
void set_solver_configuration(SolverConfiguration &solver_configuration)
Set the solver configuration object.
An object whose state is distributed along a set of processors.
This class stores solver configuration data, e.g.
The libMesh namespace provides an interface to certain functionality in the library.
PositionOfSpectrum
Defines an enum for the position of the spectrum, i.e.
SolverPackage
Defines an enum for various linear solver packages.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real