The Elk Code
zfirctof.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2020 J. K. Dewhurst and S. Sharma.
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 zfirctof(zfirc,zfir)
7 use modmain
8 implicit none
9 ! arguments
10 complex(8), intent(in) :: zfirc(ngtc)
11 complex(8), intent(out) :: zfir(ngtot)
12 ! local variables
13 integer ig
14 ! automatic arrays
15 complex(8) zfftc(ngtc)
16 ! Fourier transform function on coarse grid to G-space
17 zfftc(1:ngtc)=zfirc(1:ngtc)
18 call zfftifc(3,ngdgc,-1,zfftc)
19 ! Fourier transform to fine real-space grid
20 do ig=1,ngvc
21  zfir(igfft(ig))=zfftc(igfc(ig))
22 end do
23 zfir(igfft(ngvc+1:ngtot))=0.d0
24 call zfftifc(3,ngridg,1,zfir)
25 end subroutine
26 
integer, dimension(3) ngridg
Definition: modmain.f90:386
integer ngvc
Definition: modmain.f90:398
subroutine zfftifc(nd, n, sgn, z)
Definition: zfftifc_fftw.f90:7
integer, dimension(:), allocatable igfft
Definition: modmain.f90:406
integer, dimension(:), allocatable igfc
Definition: modmain.f90:410
integer, dimension(3) ngdgc
Definition: modmain.f90:388
subroutine zfirctof(zfirc, zfir)
Definition: zfirctof.f90:7