IFEM  90A354
Functions | Variables
eig Namespace Reference

Top-level functions for invoking eigenproblem solvers. More...

Functions

int solve (SystemMatrix *A, SystemMatrix *B, Vector &eigVal, Matrix &eigVec, int nev, int iop=1, double shift=0.0)
 Solves the eigenvalue problem using either SPRLAN, LAPACK or SLEPC. More...
 
bool solve (SystemMatrix *A, SystemMatrix *B, Vector &eigVal, Matrix &eigVec, int nev, int ncv, int mode, double shift=0.0)
 Solves the eigenvalue problem (A-lambda*B)*x = 0 using ARPACK. More...
 

Variables

bool verbose = false
 If true, print out some Arnoldi iteration info.
 

Detailed Description

Top-level functions for invoking eigenproblem solvers.

Function Documentation

◆ solve() [1/2]

int eig::solve ( SystemMatrix A,
SystemMatrix B,
Vector eigVal,
Matrix eigVec,
int  nev,
int  iop = 1,
double  shift = 0.0 
)

Solves the eigenvalue problem using either SPRLAN, LAPACK or SLEPC.

Parameters
AThe system stiffness matrix
BThe system mass matrix
[out]eigValComputed eigenvalues
[out]eigVecComputed eigenvectors
[in]nevNumber of eigenvalues/vector to compute
[in]iopSPRLAN option
[in]shiftEigenvalue shift

Depending on the matrix type an alternative eigensolver is tried. Fall back to ARPACK solver if not available.

References PETScMatrix::solveEig(), DenseMatrix::solveEig(), and SPRMatrix::solveEig().

Referenced by solve(), AlgEqSystem::staticCondensation(), and SIMbase::systemModes().

◆ solve() [2/2]

bool eig::solve ( SystemMatrix A,
SystemMatrix B,
Vector eigVal,
Matrix eigVec,
int  nev,
int  ncv,
int  mode,
double  shift = 0.0 
)

Solves the eigenvalue problem (A-lambda*B)*x = 0 using ARPACK.

Parameters
AThe system stiffness matrix
BThe system mass matrix
[out]eigValComputed eigenvalues
[out]eigVecComputed eigenvectors
[in]nevNumber of eigenvalues/vectors (see ARPack documentation)
[in]ncvNumber of Arnoldi vectors (see ARPack documentation)
[in]modeEigensolver method (1...6, see ARPack documentation)
[in]shiftEigenvalue shift

References SystemMatrix::add(), AM, SystemMatrix::compressPattern(), SystemMatrix::copy(), SystemMatrix::dim(), eig_drv1_(), eig_drv2_(), eig_drv3_(), eig_drv4_(), eig_drv5_(), eig_drv6_(), iverb, K, M, utl::vector< T >::ptr(), utl::matrixBase< T >::ptr(), utl::vector< T >::resize(), utl::matrix< T >::resize(), solve(), and verbose.