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