Commit d399d96b authored by Matthias Redies's avatar Matthias Redies

add factor 0.5 to kinetic energy den

parent 77df507d
......@@ -228,6 +228,7 @@ END SUBROUTINE cdngen
subroutine save_kinED(xcpot, input, noco, stars, cell, sym)
use m_types
use m_pw_tofrom_grid
use m_judft_stop
implicit none
CLASS(t_xcpot),INTENT(IN) :: xcpot
......@@ -245,22 +246,19 @@ subroutine save_kinED(xcpot, input, noco, stars, cell, sym)
do dim_idx = 1,3
call pw_to_grid(xcpot, input%jspins, noco%l_noco, stars, cell, &
xcpot%comparison_kinED_pw(dim_idx)%pw, grad, tmp)
if(allocated(tmp)) then
write (77,*) "tmp not allocated"
deallocate(tmp)
else
write (77,*) "tmp is so allocated"
endif
if(.not. allocated(kinED)) allocate(kinED, mold=tmp)
kinEd = kinED + tmp
enddo
kindED = 0.5 * kinED
call finish_pw_grid()
write (77,*) "kED shape =", shape(kinED)
write (*,*) "kED shape =", shape(kinED)
open(unit=69, file="kin_ED_pwway.dat")
write (69,*) kinED
close(69)
end subroutine save_kinED
END MODULE m_cdngen
......@@ -28,7 +28,19 @@ CONTAINS
write (6,*) " lowest kinetic energy density cutoff = ", minval(kinEnergyDen_RS)
kinEnergyDen_RS = max(kinEnergyDen_RS, eps)
endif
write (*,*) "kinED shape:", shape(kinEnergyDen_RS)
if(all(shape(kinEnergyDen_RS) == [6144,1])) then
write (*,*) "write old"
open(unit=69, file="kinED_pw_schroeway.dat")
write (69,*) kinEnergyDen_RS
close(69)
write (*,*) "read new"
open(unit=69, file="kin_ED_pwway.dat")
read(69,*) kinEnergyDen_RS
close(69)
endif
#else
CALL juDFT_error("MetaGGA require LibXC",hint="compile Fleur with LibXC (e.g. by giving '-external libxc' to ./configure")
#endif
......
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