Commit 08266896 authored by Matthias Redies's avatar Matthias Redies

pre merge

parent f850eb0a
......@@ -113,7 +113,7 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
! calculate kinetic energy density for MetaGGAs
if(xcpot%exc_is_metagga()) then
CALL calc_kinEnergyDen(eig_id, mpi, kpts, noco, input, banddos, cell, outDen, atoms, enpara, stars,&
CALL calc_EnergyDen(eig_id, mpi, kpts, noco, input, banddos, cell, atoms, enpara, stars,&
vacuum, DIMENSION, sphhar, sym, vTot, oneD, results, EnergyDen)
endif
......
......@@ -16,7 +16,7 @@ MODULE m_vis_xc
! including gradient corrections. t.a. 1996.
! ******************************************************
CONTAINS
SUBROUTINE vis_xc(stars,sym,cell,den,xcpot,input,noco,EnergyDen, vxc,vx,exc)
SUBROUTINE vis_xc(stars,sym,cell,den,xcpot,input,noco,EnergyDen,vtot, vxc,vx,exc)
! ******************************************************
! instead of visxcor.f: the different exchange-correlation
......@@ -41,7 +41,7 @@ CONTAINS
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_stars),INTENT(IN) :: stars
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_potden),INTENT(IN) :: den, EnergyDen
TYPE(t_potden),INTENT(IN) :: den, EnergyDen, vtot
TYPE(t_potden),INTENT(INOUT) :: vxc,vx,exc
TYPE(t_gradients) :: grad, tmp_grad
......@@ -67,21 +67,21 @@ CONTAINS
CALL pw_from_grid(xcpot,stars,input%total,v_xc,vxc%pw,vxc%pw_w)
CALL pw_from_grid(xcpot,stars,input%total,v_x,vx%pw,vx%pw_w)
if(allocated(EnergyDen%pw) .and. xcpot%exc_is_MetaGGA) then
IF(ALLOCATED(EnergyDen%pw) .AND. xcpot%exc_is_MetaGGA()) THEN
CALL pw_to_grid(xcpot, input%jspins, noco%l_noco, stars, cell, EnergyDen%pw, tmp_grad, ED_rs)
CALL pw_to_grid(xcpot, input%jspins, noco%l_noco, stars, cell, vtot%pw, tmp_grad, vtot_rs)
CALL calc_kinEnergyDen(ED_rs, vtot_rs, kinED_rs)
endif
ENDIF
!calculate the ex.-cor energy density
IF (ALLOCATED(exc%pw_w)) THEN
ALLOCATE ( e_xc(SIZE(rho,1),1) ); e_xc=0.0
if(allocated(kinED_rs)) then
IF(ALLOCATED(kinED_rs)) THEN
CALL xcpot%get_exc(input%jspins,rho,e_xc(:,1),grad,kinED_rs)
else
ELSE
CALL xcpot%get_exc(input%jspins,rho,e_xc(:,1),grad)
endif
ENDIF
CALL pw_from_grid(xcpot,stars,.TRUE.,e_xc,exc%pw,exc%pw_w)
ENDIF
......
......@@ -27,7 +27,7 @@ CONTAINS
REAL, INTENT(inout), allocatable :: kinEnergyDen_rs(:,:)
!implicit allocation
kinEnergyDen = EnergyDen_RS - vTot_RS * den_RS
kinEnergyDen_rs = EnergyDen_RS - vTot_RS * den_RS
#else
USE m_juDFT_stop
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