Skip to main content

SymSmallestEigenval

This routine computes the smallest eigenvalue of CSRMatrix.

Calling example

ans = SymSmallestEigenVal(CSRMatrix_::mat &
& [, char(2)::which, INTEGER::NCV, INTEGER::maxIter, REAL::tol])

ans = SymSmallestEigenVal(CSRMatrix_::mat, INTEGER::nev &
[&, char(2)::which, INTEGER::NCV, INTEGER::maxIter, REAL::tol])

Interface

INTERFACE
MODULE FUNCTION SymSmallestEigenVal(mat, which, NCV, maxIter, tol) &
& RESULT(ans)
TYPE(CSRMatrix_), INTENT(INOUT) :: mat
!! dense matrix
CHARACTER(*), OPTIONAL, INTENT(IN) :: which
!! `which = "SM"` ⇨ absolute smallest eigenvalue
!! `which = "SA"` ⇨ algebraic smallest eigenvalue
!! default is "SA"
INTEGER(I4B), OPTIONAL, INTENT(IN) :: NCV
!! Number of Lanczos vectors generated
!! It must be greater than 1 and smaller than `size(mat,1)`
!! Default is `NCV = MIN(n, 20)`
INTEGER(I4B), OPTIONAL, INTENT(IN) :: maxIter
!! Maximum number of iteration default = `N*10`
REAL(DFP), OPTIONAL, INTENT(IN) :: tol
!! tolerance, default = 0.0
REAL(DFP) :: ans
!! maximum eigenvalue
END FUNCTION SymSmallestEigenVal
END INTERFACE
INTERFACE
MODULE FUNCTION SymSmallestEigenVal(mat, nev, which, &
& NCV, maxIter, tol) RESULT(ans)
TYPE(CSRMatrix_), INTENT(INOUT) :: mat
!! CSRMatrix
INTEGER(I4B), INTENT(IN) :: nev
!! number of eigenvalues
CHARACTER(*), OPTIONAL, INTENT(IN) :: which
!! `which = "SM"` ⇨ absolute smallest eigenvalue
!! `which = "SA"` ⇨ algebraic smallest eigenvalue
!! default is "SA"
INTEGER(I4B), OPTIONAL, INTENT(IN) :: NCV
!! Number of Lanczos vectors generated
!! It must be greater than 1 and smaller than `size(mat,1)`
!! Default is `NCV = MIN(n, 20)`
INTEGER(I4B), OPTIONAL, INTENT(IN) :: maxIter
!! Maximum number of iteration default = `N*10`
REAL(DFP), OPTIONAL, INTENT(IN) :: tol
!! tolerance, default = 0.0
REAL(DFP) :: ans(nev)
!! smallest eigenvalue
END FUNCTION SymSmallestEigenVal
END INTERFACE