!---------------------------------------------------------! !Calls the LAPACK diagonalization subroutine DSYEV ! !input: a(n,n) = real symmetric matrix to be diagonalized! ! n = size of a ! !output: a(n,n) = orthonormal eigenvectors of a ! ! eig(n) = eigenvalues of a in ascending order ! !---------------------------------------------------------! !--------------------------! subroutine diasym(a,eig,n) implicit none integer n,l,inf real*8 a(n,n),eig(n),work(n*(3+n/2)) l=n*(3+n/2) call dsyev('V','U',n,a,n,eig,work,l,inf) end subroutine diasym !---------------------!