The Elk Code
gendcfun.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 subroutine gendcfun
7 use modmain
8 use modphonon
9 implicit none
10 ! local variables
11 integer ig
12 real(8) v1,v2,v3,t1,t2
13 complex(8) z1
14 v1=atposc(1,iaph,isph); v2=atposc(2,iaph,isph); v3=atposc(3,iaph,isph)
15 do ig=1,ngvec
16  t1=vgqc(1,ig)*v1+vgqc(2,ig)*v2+vgqc(3,ig)*v3
17  t2=ffacgq(ig,isph)*vgqc(ipph,ig)
18  z1=t2*cmplx(sin(t1),cos(t1),8)
19  dcfunig(ig)=z1
20  dcfunir(igfft(ig))=z1
21 end do
22 dcfunir(igfft(ngvec+1:ngtot))=0.d0
23 call zfftifc(3,ngridg,1,dcfunir)
24 end subroutine
25 
integer, dimension(3) ngridg
Definition: modmain.f90:386
integer ngtot
Definition: modmain.f90:390
complex(8), dimension(:), allocatable dcfunir
Definition: modphonon.f90:78
subroutine zfftifc(nd, n, sgn, z)
Definition: zfftifc_fftw.f90:7
integer, dimension(:), allocatable igfft
Definition: modmain.f90:406
integer ipph
Definition: modphonon.f90:15
integer ngvec
Definition: modmain.f90:396
real(8), dimension(:,:), allocatable vgqc
Definition: modphonon.f90:62
integer isph
Definition: modphonon.f90:15
real(8), dimension(:,:), allocatable ffacgq
Definition: modphonon.f90:74
complex(8), dimension(:), allocatable dcfunig
Definition: modphonon.f90:76
subroutine gendcfun
Definition: gendcfun.f90:7
integer iaph
Definition: modphonon.f90:15
real(8), dimension(3, maxatoms, maxspecies) atposc
Definition: modmain.f90:54