FEDEM Solver  R8.0
Source code of the dynamics solver
Functions/Subroutines | Variables
felanczosmodule Module Reference

Module with a Lanczos-based eigenvalue solver. More...

Functions/Subroutines

subroutine, public felanczossolve (MsgA, structA, coeffA, factorA, MsgB, structB, coeffB, factorB, MPARB, MTREEB, MSIFB, valueB, diagB, TOL, EVL, EVC, MIP, MOP, N, NEVAL, NEVEC, MAXLAN, MSING, LPU, IPSW, INFO)
 Solves a generalized symmetric eigenvalue problem. More...
 
subroutine felfac (INFO, LPU, KSA, KSB, KPD, N, NEVAL, EPS, NN, MSING, MsgA, structA, coeffA, factorA, MsgB, structB, coeffB, factorB, diagB, MPARB, MTREEB, MSIFB, valueB)
 Administers the matrix factorizations for the Lanczos eigensolver. More...
 
subroutine fefindandfixzeropivots (struct, coeff, NZERO, MSING, INFO)
 Repairs isolated zero pivot elements in the matrix. More...
 
subroutine fesmm (INFO, LPU, IFLAG, Ndim, AllInt, X, Y, MsgA, structA, factorA, structB, coeffB, factorB, diagB, MPARB, MTREEB, MSIFB, valueB)
 Performs some linear algebra operations for the Lanczos eigensolver. More...
 

Variables

real(wp), dimension(:,:), allocatable, save work1
 Internal work array. More...
 
real(wp), dimension(:,:), allocatable, save work2
 Internal work array. More...
 

Detailed Description

Module with a Lanczos-based eigenvalue solver.

This module contains subroutines implementing the Lanczos eigenvalue solver on top of the GSF linear equation solver.

Function/Subroutine Documentation

◆ fefindandfixzeropivots()

subroutine felanczosmodule::fefindandfixzeropivots ( type(sam), pointer  struct,
type(cam), pointer  coeff,
integer, intent(inout)  NZERO,
integer(ik), dimension(:), intent(inout)  MSING,
type(error_flag), pointer  INFO 
)

Repairs isolated zero pivot elements in the matrix.

Parameters
structSymbolic assembly data for the matrix
coeffCoefficient assembly data for the matrix
[out]NZERONumber of zero pivot elements in the matrix
[out]MSINGArray of singular equations detected during factorization
[out]INFOError handler object, nullified on success
Author
Knut Morten Okstad
Date
20 Sep 2005
Here is the call graph for this function:
Here is the caller graph for this function:

◆ felanczossolve()

subroutine, public felanczosmodule::felanczossolve ( type(messagelevel), pointer  MsgA,
type(sam), pointer  structA,
type(cam), pointer  coeffA,
type(gsfcolsup), pointer  factorA,
type(messagelevel), pointer  MsgB,
type(sam), pointer  structB,
type(cam), pointer  coeffB,
type(gsfcolsup), pointer  factorB,
integer(ik), dimension(:), intent(in), optional  MPARB,
integer(ik), dimension(:), intent(in), optional  MTREEB,
integer(ik), dimension(:), intent(in), optional  MSIFB,
real(wp), dimension(:), intent(inout), optional  valueB,
real(wp), dimension(:), intent(inout), optional  diagB,
real(wp), dimension(3), intent(inout)  TOL,
real(wp), dimension(:), intent(out)  EVL,
real(wp), dimension(:,:), intent(out)  EVC,
integer(ik), dimension(:), intent(in)  MIP,
integer(ik), dimension(:), intent(out)  MOP,
integer, intent(in)  N,
integer, intent(in)  NEVAL,
integer, intent(in)  NEVEC,
integer, intent(in)  MAXLAN,
integer(ik), dimension(:), intent(out)  MSING,
integer, intent(in)  LPU,
integer, intent(in)  IPSW,
type(error_flag), pointer  INFO 
)

Solves a generalized symmetric eigenvalue problem.

Parameters
MsgAGSF information for matrix A
MsgBGSF information for matrix B
structASymbolic assembly data for matrix A
structBSymbolic assembly data for matrix B
coeffACoefficient assembly data for matrix A
coeffBCoefficient assembly data for matrix B
factorAFactorization data for matrix A
factorBFactorization data for matrix B
[in]MPARBSparse PARameters for SPR-matrix B
[in]MTREEBElimination assembly TREES for SPR-matrix B
[in]MSIFBStorage Information for SPR-matrix B
valueBMatrix values for SPR-matrix B
diagBThe diagonal values for SPR-matrix B
TOLTolerances
[out]EVLComputed eigenvalues
[out]EVCComputed eigenvectors
[in]MIPInput options
[in]NDimension of the equation system
[in]NEVALNumber of eigenvalues to return
[in]NEVECNumber of eigenvectors to return
[in]MAXLANMaximum number of Lanczos vectors
[in]LPUFile unit number for res-file output
[in]IPSWPrint switch for debug output
[out]MOPOutput options
[out]MSINGArray of singular equations detected during factorization
[out]INFOError handler object, nullified on success

This subroutine determines the NEVAL smallest eigenvalues λi of the generalized, symmetric eigenproblem

(A - λi*B) * qi = 0

The routine also returns NLV (=MOP(3)) ortogonal Lanczos vectors or, optionally, approximations to NEVEC eigenvectors (corresponding to the NEVEC first eigenvalues). The eigenvectors, which are B-orthonormal, are returned as the first NEVEC vectors in EVC.

A is a symmetric matrix stored in sparse (compressed) format. B is either a symmetric sparse (KSB=1) or a diagonal (KSB=2) matrix. For both A and B the original matrices or their appropriate factors are accepted as input (in coeffA/factorA and coeffB/factorB). A truncated Lanczos method is used to transform the problem to tridiagonal, special form. The reduced, tridiagonal eigenproblem is solved by implicit QL transformation. Various reorthogonalization schemes may be specified.

This is the GSF version of the SPRLAN subroutine of the SAM library. The matrix B may optionally be represented by an SPR data structure, when KSB = MIP(2) = 3.

Author
Knut Morten Okstad
Date
12 May 2005
Here is the call graph for this function:
Here is the caller graph for this function:

◆ felfac()

subroutine felanczosmodule::felfac ( type(error_flag), pointer  INFO,
integer, intent(in)  LPU,
integer(ik), intent(inout)  KSA,
integer(ik), intent(inout)  KSB,
integer, intent(in)  KPD,
integer, intent(in)  N,
integer, intent(in)  NEVAL,
real(wp), intent(in)  EPS,
integer(ik), intent(out)  NN,
integer(ik), dimension(:), intent(out)  MSING,
type(messagelevel), pointer  MsgA,
type(sam), pointer  structA,
type(cam), pointer  coeffA,
type(gsfcolsup), pointer  factorA,
type(messagelevel), pointer  MsgB,
type(sam), pointer  structB,
type(cam), pointer  coeffB,
type(gsfcolsup), pointer  factorB,
real(wp), dimension(:), intent(inout), optional  diagB,
integer(ik), dimension(:), intent(in), optional  MPARB,
integer(ik), dimension(:), intent(in), optional  MTREEB,
integer(ik), dimension(:), intent(in), optional  MSIFB,
real(wp), dimension(:), intent(inout), optional  valueB 
)
private

Administers the matrix factorizations for the Lanczos eigensolver.

Parameters
[out]INFOError handler object, nullified on success
[in]LPUFile unit number for res-file output
[in]KSAFactorization option for matrix A
[in]KSBFactorization option for matrix B
[in]KPDFactorization option
[in]NDimension of the equation system
[in]NEVALNumber of eigenvalues to return
[in]EPSSingularity tolerance
[in]NNNumber of singular equations when B is diagonal
[out]MSINGArray of singular equations detected during factorization
MsgAGSF information for matrix A
structASymbolic assembly data for matrix A
coeffACoefficient assembly data for matrix A
factorAFactorization data for matrix A
MsgBGSF information for matrix B
structBSymbolic assembly data for matrix B
coeffBCoefficient assembly data for matrix B
factorBFactorization data for matrix B
diagBThe diagonal values for SPR-matrix B
[in]MPARBSparse PARameters for SPR-matrix B
[in]MTREEBElimination assembly TREES for SPR-matrix B
[in]MSIFBStorage Information for SPR-matrix B
valueBMatrix values for SPR-matrix B
Author
Knut Morten Okstad
Date
12 May 2005
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fesmm()

subroutine felanczosmodule::fesmm ( type(error_flag), pointer  INFO,
integer, intent(in)  LPU,
integer, intent(in)  IFLAG,
integer, intent(in)  Ndim,
character(len=1), intent(in)  AllInt,
real(wp), dimension(:), intent(inout)  X,
real(wp), dimension(:), intent(out)  Y,
type(messagelevel), pointer  MsgA,
type(sam), pointer  structA,
type(gsfcolsup), pointer  factorA,
type(sam), optional, pointer  structB,
type(cam), optional, pointer  coeffB,
type(gsfcolsup), optional, pointer  factorB,
real(wp), dimension(:), intent(in), optional  diagB,
integer(ik), dimension(:), intent(in), optional  MPARB,
integer(ik), dimension(:), intent(in), optional  MTREEB,
integer(ik), dimension(:), intent(in), optional  MSIFB,
real(wp), dimension(:), intent(in), optional  valueB 
)
private

Performs some linear algebra operations for the Lanczos eigensolver.

Parameters
[out]INFOError handler object, nullified on success
[in]LPUFile unit number for res-file output
[in]IFLAGOption telling which operation to perform (see below)
[in]NdimDimension of the equation system
[in]AllIntIf 'A', use full matrix, if 'I' use internal DOFs only
XVector of dimension Ndim
[out]YVector of dimension Ndim
MsgAGSF information for matrix A
structASymbolic assembly data for matrix A
factorAFactorization data for matrix A
structBSymbolic assembly data for matrix B
coeffBCoefficient assembly data for matrix B
factorBFactorization data for matrix B
[in]diagBThe diagonal values for SPR-matrix B
[in]MPARBSparse PARameters for SPR-matrix B
[in]MTREEBElimination assembly TREES for SPR-matrix B
[in]MSIFBStorage Information for SPR-matrix B
[in]valueBMatrix values for SPR-matrix B

This subroutine calculates one of the following:

  • IFLAG = 1: X := (A-1)*UbT*X
  • IFLAG = 2: Y = (A-1)*UbT*X
  • IFLAG = 3: X := Ub*(A-1)*UbT*X
  • IFLAG = 4: Y = Ub*(A-1)*UbT*X
  • IFLAG = 5: X := (Ua-T)*B*(Ua-1)*X
  • IFLAG = 6: Y = (Ua-T)*B*(Ua-1)*X

where X and Y are vectors, A is a symmetric sparse matrix, represented by its factors La*Da*LaT, stored in structA and factorA, Ua is the Cholesky factor of A, also stored in structA,factorA, B is either a symmetric sparse matrix, stored in structB,coeffB, a symmetric sparse in-core matrix, stored in MPARB, ..., valueB, or a diagonal matrix, stored in diagB. Ub is the Cholesky factor of B, stored in structB,factorB or in MPARB, ..., valueB, or in diagB if B is just a diagonal matrix.

Author
Knut Morten Okstad
Date
12 May 2005
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ work1

real(wp), dimension(:,:), allocatable, save felanczosmodule::work1
private

Internal work array.

◆ work2

real(wp), dimension(:,:), allocatable, save felanczosmodule::work2
private

Internal work array.