The Elk Code
 
Loading...
Searching...
No Matches
getevalsv.f90
Go to the documentation of this file.
1
2! Copyright (C) 2007 J. K. Dewhurst, S. Sharma and C. Ambrosch-Draxl.
3! This file is distributed under the terms of the GNU General Public License.
4! See the file COPYING for license details.
5
6subroutine getevalsv(fext,ikp,vpl,evalsv_)
7use modmain
8implicit none
9! arguments
10character(*), intent(in) :: fext
11integer, intent(in) :: ikp
12real(8), intent(in) :: vpl(3)
13real(8), intent(out) :: evalsv_(nstsv)
14! local variables
15integer isym,ik,ist
16integer recl,nstsv_
17real(8) vkl_(3),t1
18if (ikp > 0) then
19 ik=ikp
20else
21! find the k-point number
22 call findkpt(vpl,isym,ik)
23end if
24! find the record length
25inquire(iolength=recl) vkl_,nstsv_,evalsv_
26!$OMP CRITICAL(u204)
27open(204,file='EVALSV'//trim(fext),form='UNFORMATTED',access='DIRECT',recl=recl)
28read(204,rec=ik) vkl_,nstsv_,evalsv_
29close(204)
30!$OMP END CRITICAL(u204)
31t1=abs(vkl(1,ik)-vkl_(1))+abs(vkl(2,ik)-vkl_(2))+abs(vkl(3,ik)-vkl_(3))
32if (t1 > epslat) then
33 write(*,*)
34 write(*,'("Error(getevalsv): differing vectors for k-point ",I8)') ik
35 write(*,'(" current : ",3G18.10)') vkl(:,ik)
36 write(*,'(" EVALSV.OUT : ",3G18.10)') vkl_
37 write(*,*)
38 stop
39end if
40if (nstsv /= nstsv_) then
41 write(*,*)
42 write(*,'("Error(getevalsv): differing nstsv for k-point ",I8)') ik
43 write(*,'(" current : ",I8)') nstsv
44 write(*,'(" EVALSV.OUT : ",I8)') nstsv_
45 write(*,*)
46 stop
47end if
48! apply scissor correction if required
49if (tscissor) then
50 do ist=1,nstsv
51 if (evalsv_(ist) > efermi) evalsv_(ist)=evalsv_(ist)+scissor
52 end do
53end if
54end subroutine
55
subroutine findkpt(vpl, isym, ik)
Definition findkpt.f90:7
subroutine getevalsv(fext, ikp, vpl, evalsv_)
Definition getevalsv.f90:7
logical tscissor
Definition modmain.f90:906
real(8) efermi
Definition modmain.f90:904
real(8) epslat
Definition modmain.f90:24
real(8) scissor
Definition modmain.f90:908
real(8), dimension(:,:), allocatable vkl
Definition modmain.f90:471