Skip to main content

SymSmallestEigenVal

This function calculates the smallest eigenvalue of a real sym dense matrix.

  • It calls ARPACK SSAUPD or DSAUPD routine with MODE=3
  • Currently, there are four interfaces under this generic method.
  • In this routine we use shift-inverted method to compute the smallest eigenvalue of a regular (standard) eigenvalue problem.
  • This is because ARPACK is good at finding the largest eigenvalue.
  • Internally this routine solves a system of linear equations: mat * y = x by using LU decomposition.
  • In this routine we make a call to SymLUSolve and SymGetLU routine.
INTERFACE
MODULE FUNCTION SymSmallestEigenVal(mat, sigma, which, NCV, maxIter, tol) &
& RESULT(ans)
REAL(DFP), INTENT(IN) :: mat(:, :)
!! dense matrix
REAL(DFP), OPTIONAL, INTENT(IN) :: sigma
!! Default value is 0.0
CHARACTER(LEN=*), 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
caution

This routine makes a copy of mat in mat0. Then, compute the LU decomposition of mat0.

  • mat dense matrix
  • sigma Default value is 0.0
  • which = "SM" ⇨ absolute smallest eigenvalue
  • which = "SA" ⇨ algebraic smallest eigenvalue
  • default value of which is "SA"
  • NCV Number of Lanczos vectors generated. It must be greater than 1 and smaller than size(mat,1). Default is NCV = MIN(n, 20)
  • maxIter Maximum number of iteration default = N*10
  • tol tolerance, default = 0.0
  • ans maximum eigenvalue.