The Elk Code
 
Loading...
Searching...
No Matches
rndevsv.f90
Go to the documentation of this file.
1
2! Copyright (C) 2016 J. K. Dewhurst, S. Sharma and E. K. U. Gross.
3! This file is distributed under the terms of the GNU General Public License.
4! See the file COPYING for license details.
5
6subroutine rndevsv(rndm,evecsv)
7use modmain
8use modrandom
9implicit none
10! arguments
11real(8), intent(in) :: rndm
12complex(8), intent(inout) :: evecsv(nstsv,nstsv)
13! local variables
14integer ist,jst
15real(8) a,b
16if (abs(rndm) < 1.d-8) return
17! add complex random numbers to each eigenvector
18do ist=1,nstsv
19 do jst=1,nstsv
20 a=rndm*(randomu()-0.5d0)
21 b=rndm*(randomu()-0.5d0)
22 evecsv(ist,jst)=evecsv(ist,jst)+cmplx(a,b,8)
23 end do
24end do
25! orthonormalise the eigenvectors
26call unitary(nstsv,evecsv)
27end subroutine
28
real(8) function randomu()
Definition modrandom.f90:18
subroutine rndevsv(rndm, evecsv)
Definition rndevsv.f90:7
subroutine unitary(n, a)
Definition unitary.f90:10