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