The Elk Code
trimrfg.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2023 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 trimrfg(rfir)
7 use modmain
8 implicit none
9 ! arguments
10 real(8), intent(inout) :: rfir(ngtot)
11 ! automatic arrays
12 complex(8) zfft(nfgrz)
13 ! Fourier transform function to G-space
14 call rzfftifc(3,ngridg,-1,rfir,zfft)
15 ! zero the components for |G| > 2 gkmax
16 where(igrzf(1:nfgrz) > ngvc) zfft(1:nfgrz)=0.d0
17 ! Fourier transform back to real-space
18 call rzfftifc(3,ngridg,1,rfir,zfft)
19 end subroutine
20 
integer, dimension(3) ngridg
Definition: modmain.f90:386
integer ngvc
Definition: modmain.f90:398
integer, dimension(:), allocatable igrzf
Definition: modmain.f90:416
subroutine rzfftifc(nd, n, sgn, r, z)
subroutine trimrfg(rfir)
Definition: trimrfg.f90:7