The Elk Code
gencfrc.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2017 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 gencfrc
7 use modmain
8 implicit none
9 ! local variables
10 integer ig,ifg
11 ! automatic arrays
12 complex(8) zfft(nfgrzc)
13 do ifg=1,nfgrzc
14  ig=igrzfc(ifg)
15  if (ig <= ngvc) then
16  zfft(ifg)=cfunig(ig)
17  else
18  zfft(ifg)=0.d0
19  end if
20 end do
21 ! allocate global array
22 if (allocated(cfrc)) deallocate(cfrc)
23 allocate(cfrc(ngtc))
24 ! Fourier transform to real-space coarse grid
25 call rzfftifc(3,ngdgc,1,cfrc,zfft)
26 end subroutine
27 
integer ngtc
Definition: modmain.f90:392
integer, dimension(:), allocatable igrzfc
Definition: modmain.f90:418
integer ngvc
Definition: modmain.f90:398
subroutine gencfrc
Definition: gencfrc.f90:7
integer, dimension(3) ngdgc
Definition: modmain.f90:388
subroutine rzfftifc(nd, n, sgn, r, z)
real(8), dimension(:), allocatable cfrc
Definition: modmain.f90:438
complex(8), dimension(:), allocatable cfunig
Definition: modmain.f90:434