KronLinInv  0.3
Kronecker-product-based linear inversion

◆ symgeneigvv()

subroutine, private ompi_kronlininv::symgeneigvv ( real(dp), dimension(:,:), intent(in)  A,
character, intent(in)  uplo,
real(dp), dimension(:,:), intent(in)  Bpd,
real(dp), dimension(:), intent(out)  lambda,
real(dp), dimension(:,:), intent(out)  U 
)
private

Computes eigenvalues and eigenvectors of the generalized symmetric definite eigenproblem. See http://www.netlib.org/lapack/lug/node54.html

No test to check symmetry of positive definiteness is performed.

Parameters
[in]Asymmetric matrix
[in]uploupper or lower triangle stored
[in]Bpdsymmetric positive-definite matrix
[out]lambdaeigenvalues
[out]Ueigenvectors
Date
10/8/2016 - Initial Version

Definition at line 1161 of file ompi_kronlininv.f08.

1161  real(dp),intent(in) :: a(:,:),bpd(:,:)
1162  character,intent(in) :: uplo
1163  real(dp),intent(out) :: lambda(:),u(:,:)
1164  integer :: n,lwork,itype,info
1165  character :: jobz
1166  real(dp),allocatable :: work(:),tmpb(:,:)
1167  ! DSYGV computes all the eigenvalues, and optionally, the eigenvectors
1168  ! of a real generalized symmetric-definite eigenproblem, of the form
1169  ! A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
1170  ! Here A and B are assumed to be symmetric and B is also
1171  ! positive definite.
1172  itype = 3
1173  jobz = 'V'
1174  n=size(a,1)
1175  if ( (size(a,2)/=n) .or. (size(bpd,1)/=n) .or. (size(bpd,2)/=n) ) then
1176  write(*,*) "symgeneigvv(): Matrices have wrong sizes"
1177  stop
1178  end if
1179  allocate(tmpb(n,n))
1180  u = a
1181  tmpb = bpd
1182  lwork=3*n-1
1183  ! lwork=-1
1184  ! allocate(work(1))
1185  ! call DSYGV(itype,jobz,uplo,nm1,U1,nm1,choCm1,nm1,lambda1,work,lwork,info)
1186  ! deallocate(work)
1187  allocate(work(lwork))
1188  call dsygv(itype,jobz,uplo,n,u,n,tmpb,n,lambda,work,lwork,info)
1189  if (info /= 0) stop 'symgeneigvv(): Matrix eigendecomposition failed!'
Here is the caller graph for this function: