The Elk Code
dhmlistl.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2013 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 pure subroutine dhmlistl(ngp,ngpq,igpig,igpqig,vgpc,vgpqc,ld,dh)
7 use modmain
8 use modphonon
9 implicit none
10 ! arguments
11 integer, intent(in) :: ngp,ngpq
12 integer, intent(in) :: igpig(ngkmax),igpqig(ngkmax)
13 real(8), intent(in) :: vgpc(3,ngkmax),vgpqc(3,ngkmax)
14 integer, intent(in) :: ld
15 complex(8), intent(out) :: dh(ld,*)
16 ! local variables
17 integer j1,j2,j3,ig,i,j
18 real(8) v1,v2,v3,t1
19 do j=1,ngp
20  ig=igpig(j)
21  j1=ivg(1,ig); j2=ivg(2,ig); j3=ivg(3,ig)
22  v1=0.5d0*vgpc(1,j); v2=0.5d0*vgpc(2,j); v3=0.5d0*vgpc(3,j)
23  do i=1,ngpq
24  ig=igpqig(i)
25  ig=ivgig(ivg(1,ig)-j1,ivg(2,ig)-j2,ivg(3,ig)-j3)
26  if (ig <= ngvc) then
27  t1=vgpqc(1,i)*v1+vgpqc(2,i)*v2+vgpqc(3,i)*v3
28  dh(i,j)=dvsig(ig)+t1*dcfunig(ig)
29  else
30  dh(i,j)=0.d0
31  end if
32  end do
33 end do
34 end subroutine
35 
integer ngkmax
Definition: modmain.f90:499
integer, dimension(:,:,:), allocatable ivgig
Definition: modmain.f90:402
integer ngvc
Definition: modmain.f90:398
complex(8), dimension(:), pointer, contiguous dvsig
Definition: modphonon.f90:114
pure subroutine dhmlistl(ngp, ngpq, igpig, igpqig, vgpc, vgpqc, ld, dh)
Definition: dhmlistl.f90:7
integer, dimension(:,:), allocatable ivg
Definition: modmain.f90:400
complex(8), dimension(:), allocatable dcfunig
Definition: modphonon.f90:76