The Elk Code
zfirftoc.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2024 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 zfirftoc(zfir,zfirc)
7 use modmain
8 implicit none
9 ! arguments
10 complex(8), intent(in) :: zfir(ngtot)
11 complex(8), intent(out) :: zfirc(ngtc)
12 ! local variables
13 integer ig
14 ! allocatable arrays
15 complex(8), allocatable :: zfft(:)
16 allocate(zfft(ngtot))
17 ! multiply by characteristic function and Fourier transform on fine grid
18 zfft(1:ngtot)=zfir(1:ngtot)*cfunir(1:ngtot)
19 call zfftifc(3,ngridg,-1,zfft)
20 zfirc(1:ngtc)=0.d0
21 do ig=1,ngvc
22  zfirc(igfc(ig))=zfft(igfft(ig))
23 end do
24 ! Fourier transform to real-space coarse grid
25 call zfftifc(3,ngdgc,1,zfirc)
26 deallocate(zfft)
27 end subroutine
28 
integer, dimension(3) ngridg
Definition: modmain.f90:386
subroutine zfirftoc(zfir, zfirc)
Definition: zfirftoc.f90:7
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
real(8), dimension(:), allocatable cfunir
Definition: modmain.f90:436
integer, dimension(3) ngdgc
Definition: modmain.f90:388