Commit d7380394 authored by Matthias Redies's avatar Matthias Redies

cut off

parent c1499fa3
...@@ -290,6 +290,7 @@ CONTAINS ...@@ -290,6 +290,7 @@ CONTAINS
IF(PRESENT(kinEnergyDen)) THEN IF(PRESENT(kinEnergyDen)) THEN
call xc_f03_mgga_exc(xcpot%exc_func_x, SIZE(rh,1), TRANSPOSE(rh), grad%sigma, & call xc_f03_mgga_exc(xcpot%exc_func_x, SIZE(rh,1), TRANSPOSE(rh), grad%sigma, &
transpose(grad%laplace), transpose(kinEnergyDen), exc) transpose(grad%laplace), transpose(kinEnergyDen), exc)
IF (xcpot%func_exc_id_c>0) THEN IF (xcpot%func_exc_id_c>0) THEN
CALL xc_f03_mgga_exc(xcpot%exc_func_c, SIZE(rh,1), TRANSPOSE(rh), grad%sigma, & CALL xc_f03_mgga_exc(xcpot%exc_func_c, SIZE(rh,1), TRANSPOSE(rh), grad%sigma, &
transpose(grad%laplace), transpose(kinEnergyDen), excc) transpose(grad%laplace), transpose(kinEnergyDen), excc)
......
...@@ -25,9 +25,17 @@ CONTAINS ...@@ -25,9 +25,17 @@ CONTAINS
IMPLICIT NONE IMPLICIT NONE
REAL, INTENT(in) :: den_RS(:,:), EnergyDen_RS(:,:), vTot_RS(:,:) REAL, INTENT(in) :: den_RS(:,:), EnergyDen_RS(:,:), vTot_RS(:,:)
REAL, INTENT(inout), allocatable :: kinEnergyDen_RS(:,:) REAL, INTENT(inout), allocatable :: kinEnergyDen_RS(:,:)
REAL, PARAMETER :: eps = 1e-15
!implicit allocation !implicit allocation
kinEnergyDen_RS = EnergyDen_RS - vTot_RS * den_RS kinEnergyDen_RS = EnergyDen_RS - vTot_RS * den_RS
if(any(kinEnergyDen_RS < eps)) then
write (6,*) " lowest kinetic energy density cutoff = ", minval(kinEnergyDen_RS)
kinEnergyDen_RS = max(kinEnergyDen_RS, eps)
write (6,*) " afterwards = ", minval(kinEnergyDen_RS)
endif
#else #else
USE m_juDFT_stop USE m_juDFT_stop
CALL juDFT_error("MetaGGA require LibXC",hint="compile Fleur with LibXC (e.g. by giving '-external libxc' to ./configure") CALL juDFT_error("MetaGGA require LibXC",hint="compile Fleur with LibXC (e.g. by giving '-external libxc' to ./configure")
......
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