The Elk Code
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
6
subroutine
rndevsv
(rndm,evecsv)
7
use
modmain
8
use
modrandom
9
implicit none
10
! arguments
11
real(8)
,
intent(in)
:: rndm
12
complex(8)
,
intent(inout)
:: evecsv(nstsv,nstsv)
13
! local variables
14
integer
ist,jst
15
real(8)
a,b
16
if
(abs(rndm) < 1.d-8)
return
17
! add complex random numbers to each eigenvector
18
do
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
24
end do
25
! orthonormalise the eigenvectors
26
call
unitary
(nstsv,evecsv)
27
end subroutine
28
modrandom
Definition:
modrandom.f90:6
rndevsv
subroutine rndevsv(rndm, evecsv)
Definition:
rndevsv.f90:7
modmain
Definition:
modmain.f90:6
modrandom::randomu
real(8) function randomu()
Definition:
modrandom.f90:18
unitary
subroutine unitary(n, a)
Definition:
unitary.f90:10
rndevsv.f90
Generated by
1.8.14