diagV.F90

Go to the documentation of this file.
00001 subroutine diagV(nm,mat,eig)
00002 implicit none 
00003 integer,intent(in)::nm
00004 complex(8),intent(inout)::mat(nm,nm)
00005 real(8),intent(out)::eig(nm)
00006 integer::LWORK,LRWORK,LIWORK  
00007 integer,allocatable::iwork_zheevd(:)
00008 real(8),allocatable::rwork_zheevd(:)
00009 complex(8),allocatable::work_zheevd(:)
00010 integer::ind
00011 real(8)::eps 
00012 !---
00013 LWORK= 2*nm+nm**2
00014 LRWORK=1+12*nm+3*nm**2
00015 LIWORK=3+10*nm 
00016 allocate(work_zheevd(LWORK));work_zheevd(:)=0.0d0
00017 allocate(rwork_zheevd(LRWORK));rwork_zheevd(:)=0.0d0
00018 allocate(iwork_zheevd(LIWORK));iwork_zheevd(:)=0
00019 eps=1.0d-18
00020 ind=0                 
00021 !---
00022 call zheevd("V","U",nm,mat,nm,eig,work_zheevd,LWORK, &
00023         rwork_zheevd,LRWORK,iwork_zheevd,LIWORK,ind)
00024 !---
00025 if(ind/=0) then 
00026 write(6,*) 'ind=',ind 
00027 stop
00028 endif 
00029 !---
00030 deallocate(work_zheevd,rwork_zheevd,iwork_zheevd) 
00031 return 
00032 end subroutine

Generated on 17 Nov 2020 for respack by  doxygen 1.6.1