Commit 9c94dedf authored by Matthias Redies's avatar Matthias Redies

pre-morning merge

parent 737ceb22
......@@ -257,7 +257,7 @@ subroutine save_kinED(xcpot, input, noco, stars, cell, sym)
write (*,*) "kED shape =", shape(kinED)
open(unit=69, file="kin_ED_pwway.dat")
write (69,*) kinED
write (69,'(ES17.10)') kinED
close(69)
end subroutine save_kinED
......
......@@ -53,6 +53,7 @@ CONTAINS
!Put the charge on the grid, in GGA case also calculate gradients
CALL pw_to_grid(xcpot,input%jspins,noco%l_noco,stars,cell,den%pw,grad,rho)
call give_stats(rho, "rho")
ALLOCATE(v_xc,mold=rho)
ALLOCATE(v_x,mold=rho)
......
......@@ -22,7 +22,12 @@ CONTAINS
REAL, PARAMETER :: eps = 1e-15
!implicit allocation
call give_stats(EnergyDen_RS, array_name="ED_RS")
call give_stats(vTot_RS, array_name="vTot_RS")
call give_stats(den_RS, array_name="den_RS")
kinEnergyDen_RS = EnergyDen_RS - vTot_RS * den_RS
call give_stats(kinEnergyDen_RS, array_name="kin_ED_RS")
write (*,*) ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
if(any(kinEnergyDen_RS < eps)) then
write (6,*) " lowest kinetic energy density cutoff = ", minval(kinEnergyDen_RS)
......@@ -33,7 +38,7 @@ CONTAINS
if(all(shape(kinEnergyDen_RS) == [6144,1])) then
write (*,*) "write old"
open(unit=69, file="kinED_pw_schroeway.dat")
write (69,*) kinEnergyDen_RS
write (69,'(ES17.10)') kinEnergyDen_RS
close(69)
write (*,*) "read new"
......@@ -46,6 +51,20 @@ CONTAINS
#endif
END SUBROUTINE calc_kinEnergyDen
SUBROUTINE give_stats(array, array_name)
implicit none
real, intent(in) :: array(:,:)
character(len=*), optional :: array_name
write (*,*) "#############################"
if(present(array_name)) write (*,*) "Array = ", array_name
write (*,'(A,ES17.10)') "min = ", minval(array)
write (*,'(A,ES17.10)') "max = ", maxval(array)
write (*,'(A,ES17.10)') "mean = ", sum(array) / size(array)
write (*,*) "#############################"
END SUBROUTINE give_stats
SUBROUTINE calc_EnergyDen(eig_id, mpi, kpts, noco, input, banddos, cell, atoms, enpara, stars, &
vacuum, DIMENSION, sphhar, sym, vTot, oneD, results, EnergyDen)
! calculates the energy density
......
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