The Elk Code
getevalwx.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2020 Chung-Yu Wang, J. K. Dewhurst, S. Sharma and
3 ! E. K. U. Gross. This file is distributed under the terms of the GNU General
4 ! Public License. See the file COPYING for license details.
5 
6 subroutine getevalwx(iq,evalwxp)
7 use modmain
8 use modphonon
9 implicit none
10 ! arguments
11 integer, intent(in) :: iq
12 real(8), intent(out) :: evalwxp(nbph)
13 ! local variables
14 integer recl,nbph_
15 real(8) vql_(3),t1
16 ! find the record length
17 inquire(iolength=recl) vql_,nbph_,evalwxp
18 !$OMP CRITICAL(u330)
19 open(330,file='EVALWX.OUT',form='UNFORMATTED',access='DIRECT',recl=recl)
20 read(330,rec=iq) vql_,nbph_,evalwxp
21 close(330)
22 !$OMP END CRITICAL(u330)
23 t1=abs(vql(1,iq)-vql_(1))+abs(vql(2,iq)-vql_(2))+abs(vql(3,iq)-vql_(3))
24 if (t1 > epslat) then
25  write(*,*)
26  write(*,'("Error(getevalwx): differing vectors for q-point ",I8)') iq
27  write(*,'(" current : ",3G18.10)') vql(:,iq)
28  write(*,'(" EVALWX.OUT : ",3G18.10)') vql_
29  write(*,*)
30  stop
31 end if
32 if (nbph /= nbph_) then
33  write(*,*)
34  write(*,'("Error(getevalwx): differing nbph for q-point ",I8)') iq
35  write(*,'(" current : ",I8)') nbph
36  write(*,'(" EVALWX.OUT : ",I8)') nbph_
37  write(*,*)
38  stop
39 end if
40 end subroutine
41 
subroutine getevalwx(iq, evalwxp)
Definition: getevalwx.f90:7
real(8), dimension(:,:), allocatable vql
Definition: modmain.f90:545
real(8) epslat
Definition: modmain.f90:24