MFEM  v4.5.2
Finite element discretization library
Public Types | Public Member Functions | List of all members
mfem::SlepcEigenSolver Class Reference

#include <slepc.hpp>

Public Types

enum  Which {
  LARGEST_MAGNITUDE, SMALLEST_MAGNITUDE, LARGEST_REAL, SMALLEST_REAL,
  LARGEST_IMAGINARY, SMALLEST_IMAGINARY, TARGET_MAGNITUDE, TARGET_REAL
}
 
enum  SpectralTransformation { SHIFT, SHIFT_INVERT }
 

Public Member Functions

 SlepcEigenSolver (MPI_Comm comm, const std::string &prefix=std::string())
 Constructors. More...
 
virtual ~SlepcEigenSolver ()
 
void SetTol (double tol)
 Set solver tolerance. More...
 
void SetMaxIter (int max_iter)
 Set maximum number of iterations. More...
 
void SetNumModes (int num_eigs)
 Set the number of required eigenmodes. More...
 
void SetOperator (const PetscParMatrix &op)
 Set operator for standard eigenvalue problem. More...
 
void SetOperators (const PetscParMatrix &op, const PetscParMatrix &opB)
 Set operator for generalized eigenvalue problem. More...
 
void Customize (bool customize=true) const
 Customize object with options set. More...
 
void Solve ()
 Solve the eigenvalue problem for the specified number of eigenvalues. More...
 
int GetNumConverged ()
 Get the number of converged eigenvalues. More...
 
void GetEigenvalue (unsigned int i, double &lr) const
 Get the corresponding eigenvalue. More...
 
void GetEigenvalue (unsigned int i, double &lr, double &lc) const
 
void GetEigenvector (unsigned int i, Vector &vr) const
 Get the corresponding eigenvector. More...
 
void GetEigenvector (unsigned int i, Vector &vr, Vector &vc) const
 
void SetWhichEigenpairs (Which which)
 
void SetTarget (double target)
 
void SetSpectralTransformation (SpectralTransformation transformation)
 
 operator slepc::EPS () const
 Conversion function to SLEPc's EPS type. More...
 
 operator PetscObject () const
 Conversion function to PetscObject. More...
 

Detailed Description

Definition at line 36 of file slepc.hpp.

Member Enumeration Documentation

◆ SpectralTransformation

Enumerator
SHIFT 
SHIFT_INVERT 

Definition at line 97 of file slepc.hpp.

◆ Which

Target spectrum for the eigensolver. Target imaginary is not supported without complex support in SLEPc, and intervals are not implemented.

Enumerator
LARGEST_MAGNITUDE 
SMALLEST_MAGNITUDE 
LARGEST_REAL 
SMALLEST_REAL 
LARGEST_IMAGINARY 
SMALLEST_IMAGINARY 
TARGET_MAGNITUDE 
TARGET_REAL 

Definition at line 85 of file slepc.hpp.

Constructor & Destructor Documentation

◆ SlepcEigenSolver()

mfem::SlepcEigenSolver::SlepcEigenSolver ( MPI_Comm  comm,
const std::string &  prefix = std::string() 
)

Constructors.

Definition at line 60 of file slepc.cpp.

◆ ~SlepcEigenSolver()

mfem::SlepcEigenSolver::~SlepcEigenSolver ( )
virtual

Definition at line 70 of file slepc.cpp.

Member Function Documentation

◆ Customize()

void mfem::SlepcEigenSolver::Customize ( bool  customize = true) const

Customize object with options set.

Definition at line 137 of file slepc.cpp.

◆ GetEigenvalue() [1/2]

void mfem::SlepcEigenSolver::GetEigenvalue ( unsigned int  i,
double &  lr 
) const

Get the corresponding eigenvalue.

Definition at line 147 of file slepc.cpp.

◆ GetEigenvalue() [2/2]

void mfem::SlepcEigenSolver::GetEigenvalue ( unsigned int  i,
double &  lr,
double &  lc 
) const

Definition at line 152 of file slepc.cpp.

◆ GetEigenvector() [1/2]

void mfem::SlepcEigenSolver::GetEigenvector ( unsigned int  i,
Vector vr 
) const

Get the corresponding eigenvector.

Definition at line 158 of file slepc.cpp.

◆ GetEigenvector() [2/2]

void mfem::SlepcEigenSolver::GetEigenvector ( unsigned int  i,
Vector vr,
Vector vc 
) const

Definition at line 171 of file slepc.cpp.

◆ GetNumConverged()

int mfem::SlepcEigenSolver::GetNumConverged ( )

Get the number of converged eigenvalues.

Definition at line 188 of file slepc.cpp.

◆ operator PetscObject()

mfem::SlepcEigenSolver::operator PetscObject ( ) const
inline

Conversion function to PetscObject.

Definition at line 111 of file slepc.hpp.

◆ operator slepc::EPS()

mfem::SlepcEigenSolver::operator slepc::EPS ( ) const
inline

Conversion function to SLEPc's EPS type.

Definition at line 108 of file slepc.hpp.

◆ SetMaxIter()

void mfem::SlepcEigenSolver::SetMaxIter ( int  max_iter)

Set maximum number of iterations.

Definition at line 116 of file slepc.cpp.

◆ SetNumModes()

void mfem::SlepcEigenSolver::SetNumModes ( int  num_eigs)

Set the number of required eigenmodes.

Definition at line 124 of file slepc.cpp.

◆ SetOperator()

void mfem::SlepcEigenSolver::SetOperator ( const PetscParMatrix op)

Set operator for standard eigenvalue problem.

Definition at line 81 of file slepc.cpp.

◆ SetOperators()

void mfem::SlepcEigenSolver::SetOperators ( const PetscParMatrix op,
const PetscParMatrix opB 
)

Set operator for generalized eigenvalue problem.

Definition at line 93 of file slepc.cpp.

◆ SetSpectralTransformation()

void mfem::SlepcEigenSolver::SetSpectralTransformation ( SlepcEigenSolver::SpectralTransformation  transformation)

Definition at line 234 of file slepc.cpp.

◆ SetTarget()

void mfem::SlepcEigenSolver::SetTarget ( double  target)

Definition at line 229 of file slepc.cpp.

◆ SetTol()

void mfem::SlepcEigenSolver::SetTol ( double  tol)

Set solver tolerance.

Definition at line 106 of file slepc.cpp.

◆ SetWhichEigenpairs()

void mfem::SlepcEigenSolver::SetWhichEigenpairs ( SlepcEigenSolver::Which  which)

Definition at line 195 of file slepc.cpp.

◆ Solve()

void mfem::SlepcEigenSolver::Solve ( )

Solve the eigenvalue problem for the specified number of eigenvalues.

Definition at line 130 of file slepc.cpp.


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