The Elk Code
 
Loading...
Searching...
No Matches
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
6subroutine gencfrc
7use modmain
8implicit none
9! local variables
10integer ig,ifg
11! automatic arrays
12complex(8) zfft(nfgrzc)
13do 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
20end do
21! allocate global array
22if (allocated(cfrc)) deallocate(cfrc)
23allocate(cfrc(ngtc))
24! Fourier transform to real-space coarse grid
25call rzfftifc(3,ngdgc,1,cfrc,zfft)
26end subroutine
27
subroutine gencfrc
Definition gencfrc.f90:7
real(8), dimension(:), allocatable cfrc
Definition modmain.f90:438
integer, dimension(3) ngdgc
Definition modmain.f90:388
complex(8), dimension(:), allocatable cfunig
Definition modmain.f90:434
integer ngtc
Definition modmain.f90:392
integer, dimension(:), allocatable igrzfc
Definition modmain.f90:418
integer ngvc
Definition modmain.f90:398
subroutine rzfftifc(nd, n, sgn, r, z)