The Elk Code
gendvsig.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 gendvsig
7 use modmain
8 use modphonon
9 implicit none
10 ! allocatable arrays
11 complex(8), allocatable :: zfft(:)
12 allocate(zfft(ngtot))
13 zfft(1:ngtot)=dvsir(1:ngtot)*cfunir(1:ngtot)
14 zfft(1:ngtot)=zfft(1:ngtot)+vsir(1:ngtot)*dcfunir(1:ngtot)
15 ! Fourier transform to G+q-space
16 call zfftifc(3,ngridg,-1,zfft)
17 ! store in global array
18 dvsig(1:ngvc)=zfft(igfft(1:ngvc))
19 deallocate(zfft)
20 end subroutine
21 
integer, dimension(3) ngridg
Definition: modmain.f90:386
integer ngtot
Definition: modmain.f90:390
complex(8), dimension(:), allocatable dvsir
Definition: modphonon.f90:112
complex(8), dimension(:), allocatable dcfunir
Definition: modphonon.f90:78
subroutine gendvsig
Definition: gendvsig.f90:7
integer ngvc
Definition: modmain.f90:398
real(8), dimension(:), allocatable vsir
Definition: modmain.f90:651
subroutine zfftifc(nd, n, sgn, z)
Definition: zfftifc_fftw.f90:7
complex(8), dimension(:), pointer, contiguous dvsig
Definition: modphonon.f90:114
integer, dimension(:), allocatable igfft
Definition: modmain.f90:406
real(8), dimension(:), allocatable cfunir
Definition: modmain.f90:436