DOLFINx 0.11.0.0
DOLFINx C++ interface
Loading...
Searching...
No Matches
SLEPcEigenSolver Class Reference

This class provides an eigenvalue solver for PETSc matrices. It is a wrapper for the SLEPc eigenvalue solver. More...

#include <slepc.h>

Public Member Functions

 SLEPcEigenSolver (MPI_Comm comm)
 Create eigenvalue solver.
 SLEPcEigenSolver (EPS eps, bool inc_ref_count)
 Create eigenvalue solver from EPS object.
 SLEPcEigenSolver (const SLEPcEigenSolver &)=delete
 SLEPcEigenSolver (SLEPcEigenSolver &&solver) noexcept
 Move constructor.
 ~SLEPcEigenSolver ()
 Destructor.
SLEPcEigenSolveroperator= (const SLEPcEigenSolver &)=delete
SLEPcEigenSolveroperator= (SLEPcEigenSolver &&solver) noexcept
 Move assignment.
void set_operators (const Mat A, const Mat B)
void solve ()
 Compute all eigenpairs of the matrix A (solve \(A x = \lambda x\)).
void solve (std::int64_t n)
std::complex< PetscReal > get_eigenvalue (int i) const
 Get ith eigenvalue.
void get_eigenpair (PetscScalar &lr, PetscScalar &lc, Vec r, Vec c, int i) const
 Get ith eigenpair.
int get_iteration_number () const
 Get the number of iterations used by the solver.
std::int64_t get_number_converged () const
 Get the number of converged eigenvalues.
void set_options_prefix (const std::string &options_prefix)
std::string get_options_prefix () const
void set_from_options () const
 Set options from PETSc options database.
EPS eps () const
 Return SLEPc EPS pointer.
MPI_Comm comm () const
 Return MPI communicator.

Detailed Description

This class provides an eigenvalue solver for PETSc matrices. It is a wrapper for the SLEPc eigenvalue solver.

Member Function Documentation

◆ get_options_prefix()

std::string get_options_prefix ( ) const

Returns the prefix used by PETSc when searching the PETSc options database

◆ set_operators()

void set_operators ( const Mat A,
const Mat B )

Set operators (B may be nullptr for regular eigenvalues problems)

◆ set_options_prefix()

void set_options_prefix ( const std::string & options_prefix)

Sets the prefix used by PETSc when searching the PETSc options database

◆ solve()

void solve ( std::int64_t n)

Compute the n first eigenpairs of the matrix A (solve \(A x = \lambda x\))


The documentation for this class was generated from the following files: