MFEM  v4.3.0
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
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

Enumerator
SHIFT 
SHIFT_INVERT 

Definition at line 97 of file slepc.hpp.

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

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

Constructors.

Definition at line 60 of file slepc.cpp.

mfem::SlepcEigenSolver::~SlepcEigenSolver ( )
virtual

Definition at line 70 of file slepc.cpp.

Member Function Documentation

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

Customize object with options set.

Definition at line 137 of file slepc.cpp.

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

Get the corresponding eigenvalue.

Definition at line 147 of file slepc.cpp.

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

Definition at line 152 of file slepc.cpp.

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

Get the corresponding eigenvector.

Definition at line 158 of file slepc.cpp.

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

Definition at line 171 of file slepc.cpp.

int mfem::SlepcEigenSolver::GetNumConverged ( )

Get the number of converged eigenvalues.

Definition at line 188 of file slepc.cpp.

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

Conversion function to PetscObject.

Definition at line 111 of file slepc.hpp.

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

Conversion function to SLEPc's EPS type.

Definition at line 108 of file slepc.hpp.

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

Set maximum number of iterations.

Definition at line 116 of file slepc.cpp.

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

Set the number of required eigenmodes.

Definition at line 124 of file slepc.cpp.

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

Set operator for standard eigenvalue problem.

Definition at line 81 of file slepc.cpp.

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

Set operator for generalized eigenvalue problem.

Definition at line 93 of file slepc.cpp.

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

Definition at line 234 of file slepc.cpp.

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

Definition at line 229 of file slepc.cpp.

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

Set solver tolerance.

Definition at line 106 of file slepc.cpp.

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

Definition at line 195 of file slepc.cpp.

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: