Commit 1a8c8578 authored by Matthias Redies's avatar Matthias Redies

allocate in prep routine

parent 90e53f25
......@@ -33,13 +33,13 @@ CONTAINS
TYPE(t_cell),INTENT(IN) :: cell
!
!
INTEGER,INTENT(OUT) :: igxc_fft(0:stars%kxc1_fft*stars%kxc2_fft*stars%kxc3_fft-1)
REAL ,INTENT(OUT) :: gxc_fft(0:stars%kxc1_fft*stars%kxc2_fft*stars%kxc3_fft-1,3)
INTEGER,INTENT(INOUT), ALLOCATABLE :: igxc_fft(:)
REAL ,INTENT(INOUT), ALLOCATABLE :: gxc_fft(:,:)
!
!---> local variables
!
LOGICAL NEW
INTEGER istr,iop,iopm1,il,im,in,kidx,iv1d,ifftq1,ifftq2
INTEGER istr,iop,iopm1,il,im,in,kidx,iv1d,ifftq1,ifftq2, ifftxc3d
INTEGER nop_local,norm,kr(3,sym%nop)
!-------> abbreviations
......@@ -59,6 +59,15 @@ CONTAINS
! in the positive domain of the charge density fft-box.
! correspondes to igfft(*,2)
!
! allocate output arrays
ifftxc3d = stars%kxc1_fft*stars%kxc2_fft*stars%kxc3_fft
IF(ALLOCATED(igxc_fft)) DEALLOCATE(igxc_fft)
IF(ALLOCATED(gxc_fft)) DEALLOCATE(gxc_fft)
ALLOCATE(igxc_fft(0:ifftxc3d-1))
ALLOCATE(gxc_fft(0:ifftxc3d-1,3))
kidx = 0
ifftq1 = stars%kxc1_fft
ifftq2 = stars%kxc1_fft*stars%kxc2_fft
......
......@@ -35,10 +35,10 @@ CONTAINS
ifftd=27*stars%mx1*stars%mx2*stars%mx3
ifftxc3d = stars%kxc1_fft*stars%kxc2_fft*stars%kxc3_fft
IF (xcpot%needs_grad()) THEN
ALLOCATE ( igxc_fft(0:ifftxc3d-1),gxc_fft(0:ifftxc3d-1,3) )
CALL prp_xcfft_map(stars,sym, cell, igxc_fft,gxc_fft)
ENDIF
ifftxc3=stars%kxc1_fft*stars%kxc2_fft*stars%kxc3_fft
ifftxc3 = stars%kxc1_fft*stars%kxc2_fft*stars%kxc3_fft
write(6,*) "thingiaminvestigating", ifftxc3d == ifftxc3
END SUBROUTINE init_pw_grid
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment