The Elk Code
getevaluv.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2019 J. K. Dewhurst and S. Sharma.
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 getevaluv(ik,evaluvp)
7 use modmain
8 implicit none
9 ! arguments
10 integer, intent(in) :: ik
11 real(8), intent(out) :: evaluvp(nstsv)
12 ! local variables
13 integer recl,nstsv_
14 real(8) vkl_(3),t1
15 ! find the record length
16 inquire(iolength=recl) vkl_,nstsv_,evaluvp
17 !$OMP CRITICAL(u320)
18 open(320,file='EVALUV.OUT',form='UNFORMATTED',access='DIRECT',recl=recl)
19 read(320,rec=ik) vkl_,nstsv_,evaluvp
20 close(320)
21 !$OMP END CRITICAL(u320)
22 t1=abs(vkl(1,ik)-vkl_(1))+abs(vkl(2,ik)-vkl_(2))+abs(vkl(3,ik)-vkl_(3))
23 if (t1 > epslat) then
24  write(*,*)
25  write(*,'("Error(getevaluv): differing vectors for k-point ",I8)') ik
26  write(*,'(" current : ",3G18.10)') vkl(:,ik)
27  write(*,'(" EVALUV.OUT : ",3G18.10)') vkl_
28  write(*,*)
29  stop
30 end if
31 if (nstsv /= nstsv_) then
32  write(*,*)
33  write(*,'("Error(getevaluv): differing nstsv for k-point ",I8)') ik
34  write(*,'(" current : ",I8)') nstsv
35  write(*,'(" EVALUV.OUT : ",I8)') nstsv_
36  write(*,*)
37  stop
38 end if
39 end subroutine
40 
subroutine getevaluv(ik, evaluvp)
Definition: getevaluv.f90:7
real(8), dimension(:,:), allocatable vkl
Definition: modmain.f90:471
real(8) epslat
Definition: modmain.f90:24