Commit 08f0110a authored by Alexander Neukirchen's avatar Alexander Neukirchen

divergence uncommented; FLEUR does not die; great success :D

parent 4e2627f6
......@@ -501,12 +501,12 @@ CONTAINS
! DIVERGENCE
! CALL divB%init(stars,atoms,sphhar,vacuum,noco,input%jspins,POTDEN_TYPE_DEN)
! ALLOCATE(divB%pw_w,mold=divB%pw)
CALL divB%init(stars,atoms,sphhar,vacuum,noco,input%jspins,POTDEN_TYPE_DEN)
ALLOCATE(divB%pw_w,mold=divB%pw)
! DO i=1,atoms%ntype
! CALL divergence(input%jspins,i,stars%kxc1_fft*stars%kxc2_fft*stars%kxc3_fft,atoms,sphhar,sym,stars,cell,vacuum,noco,xcB,divB)
! END DO
DO i=1,atoms%ntype
CALL divergence(input%jspins,i,stars%kxc1_fft*stars%kxc2_fft*stars%kxc3_fft,atoms,sphhar,sym,stars,cell,vacuum,noco,xcB,divB)
END DO
! CALL vDiv%init(stars,atoms,sphhar,vacuum,noco,1,POTDEN_TYPE_POTCOUL)
! ALLOCATE(vDiv%pw_w(SIZE(vDiv%pw,1),size(vDiv%pw,2)))
......
......@@ -97,13 +97,13 @@ CONTAINS
REAL, ALLOCATABLE :: div_temp(:, :)
INTEGER :: i, nsp
nsp = 3*ifftxc3
nsp = ifftxc3
! CALL xcpot%alloc_gradients(ifftxc3,1,gradx)
! CALL xcpot%alloc_gradients(ifftxc3,2,gradx)
! CALL xcpot%alloc_gradients(ifftxc3,3,gradx)
ALLOCATE (gradx%gr(3,nsp,1))
ALLOCATE (grady%gr(3,nsp,1))
ALLOCATE (gradz%gr(3,nsp,1))
! ALLOCATE (gradx%gr(3,nsp,1))
! ALLOCATE (grady%gr(3,nsp,1))
! ALLOCATE (gradz%gr(3,nsp,1))
! ALLOCATE (gradx%agrt(nsp),grady%agrt(nsp),gradz%agrt(nsp))
! ALLOCATE (gradx%agru(nsp),grady%agru(nsp),gradz%agru(nsp))
! ALLOCATE (gradx%agrd(nsp),grady%agrd(nsp),gradz%agrd(nsp))
......@@ -126,8 +126,7 @@ CONTAINS
! DEALLOCATE(gradx%agrt,gradx%agru,gradx%agrd,gradx%gggrt,gradx%gggru,gradx%gggrd,gradx%gzgr,gradx%g2rt,gradx%g2ru,gradx%g2rd)
! DEALLOCATE(grady%agrt,grady%agru,grady%agrd,grady%gggrt,grady%gggru,grady%gggrd,grady%gzgr,grady%g2rt,grady%g2ru,grady%g2rd)
! DEALLOCATE(gradz%agrt,gradz%agru,gradz%agrd,gradz%gggrt,gradz%gggru,gradz%gggrd,gradz%gzgr,gradz%g2rt,gradz%g2ru,gradz%g2rd)
print *, ifftxc3
DO i = 1, ifftxc3
div_temp(i,1)=gradx%gr(1,i,1)+grady%gr(2,i,1)+gradz%gr(3,i,1)
ENDDO ! i
......
......@@ -233,6 +233,11 @@ CONTAINS
!Dummy rho (only possible if grad is used for libxc mode)
!CALL mkgxyz3 (RESHAPE((/0.0/),(/1,1/)),rhd1(0:,:,1),rhd1(0:,:,2),rhd1(0:,:,3),&
! rhd2(0:,:,1),rhd2(0:,:,3),rhd2(0:,:,6), rhd2(0:,:,5),rhd2(0:,:,4),rhd2(0:,:,2),grad)
IF (dograds.and.(.not.PRESENT(xcpot))) THEN
ALLOCATE(grad%gr(3,ifftxc3,1))
END IF
CALL mkgxyz3 (0*rhd1(0:,:,1),rhd1(0:,:,1),rhd1(0:,:,2),rhd1(0:,:,3),&
rhd2(0:,:,1),rhd2(0:,:,3),rhd2(0:,:,6), rhd2(0:,:,5),rhd2(0:,:,4),rhd2(0:,:,2),grad)
END IF
......
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