-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcalcdosve.f90
95 lines (67 loc) · 2.43 KB
/
calcdosve.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
! The code was developed at the Fritz Haber Institute, and
! the intellectual properties and copyright of this file
! are with the Max Planck Society. When you use it, please
! cite R. Gomez-Abal, X. Li, C. Ambrosch-Draxl, M. Scheffler,
! Extended linear tetrahedron method for the calculation of q-dependent
! dynamical response functions, to be published in Comp. Phys. Commun. (2010)
!BOP
!
! !ROUTINE: calcdosve
!
! !INTERFACE:
subroutine calcdosve(nik,nbd,eband,ntet,tetc,wtet,vt,emin,&
& emax,ne,dens)
!
! !DESCRIPTION:
!
! This subroutine calculates the density of states between emin and emax
!
! !USES:
use order
implicit none
! !INPUT PARAMETERS:
integer(4), intent(in) :: nik ! Number of irreducible k-points
integer(4), intent(in) :: nbd ! Maximum number of bands
real(8), intent(in) :: eband(nbd,nik) ! Band energies
integer(4), intent(in) :: ntet ! Number of tetrahedra
integer(4), intent(in) :: tetc(4,*)! id. numbers of the corners
! of the tetrahedra
integer(4), intent(in) :: wtet(*) ! weight of each tetrahedron
real(8), intent(in) :: vt ! the volume of the tetrahedra
real(8), intent(in) :: emin ! minimum energy
real(8), intent(in) :: emax ! maximum energy
integer(4), intent(in) :: ne ! number of energy steps
! !OUTPUT PARAMETERS:
real(8), intent(out) :: dens(2,*) ! the energy in the first
! column and the density
! of states in the second
!
! !LOCAL VARIABLES:
integer(4) :: itet,ine,i,ib
real(8) :: dele
real(8), dimension(4) :: ee
real(8), external :: dos1t
! !REVISION HISTORY:
!
! Created: 3th. March 2004. by RGA
!
!EOP
!
!BOC
dele=(emax-emin)/dble(ne-1)
do ine=1,ne
dens(1,ine)=emin+dele*dble(ine-1)
dens(2,ine)=0.0d0
do itet=1,ntet
do ib=1,nbd
do i=1,4
ee(i)=eband(ib,tetc(i,itet))
enddo
call sort(4,ee)
dens(2,ine)=dens(2,ine)+wtet(itet)*dos1t(ee,dens(1,ine),vt)
enddo
enddo
enddo
return
end subroutine calcdosve
!EOC