Commit 19f54526 authored by Matthias Redies's avatar Matthias Redies

clean TranBlaha

parent bbc5b5d3
......@@ -415,7 +415,7 @@ CONTAINS
! mix input and output densities
CALL mix_charge(field2,DIMENSION,mpi,(iter==input%itmax.OR.judft_was_argument("-mix_io")),&
stars,atoms,sphhar,vacuum,input,&
sym,cell,noco,oneD,archiveType,inDen,outDen,results)
sym,cell,noco,oneD,archiveType,xcpot,iter,inDen,outDen,results)
IF(mpi%irank == 0) THEN
WRITE (6,FMT=8130) iter
......
......@@ -17,7 +17,7 @@ contains
SUBROUTINE mix_charge( field, DIMENSION, mpi, l_writehistory,&
stars, atoms, sphhar, vacuum, input, sym, cell, noco, &
oneD, archiveType, inDen, outDen, results )
oneD, archiveType, xcpot, iteration, inDen, outDen, results )
use m_juDFT
use m_constants
......@@ -47,10 +47,11 @@ contains
type(t_dimension), intent(in) :: dimension
type(t_mpi), intent(in) :: mpi
TYPE(t_atoms),TARGET,INTENT(in) :: atoms
class(t_xcpot), intent(in) :: xcpot
type(t_potden), intent(inout) :: outDen
type(t_results), intent(inout) :: results
type(t_potden), intent(inout) :: inDen
integer, intent(in) :: archiveType
integer, intent(in) :: archiveType, iteration
LOGICAL, INTENT(IN) :: l_writehistory
real :: fix
......@@ -129,7 +130,7 @@ contains
CALL judft_error("Unknown Mixing schema")
END SELECT
CALL timestop("Mixing")
CALL timestart("Postprocessing")
!extracte mixed density
......@@ -146,6 +147,11 @@ contains
CALL mixvector_reset()
ENDIF
if(iteration == 1 .and. xcpot%vx_is_MetaGGA()) then
CALL mixing_history_reset(mpi)
CALL mixvector_reset()
endif
!fix charge of the new density
IF (mpi%irank==0) CALL qfix(mpi,stars,atoms,sym,vacuum, sphhar,input,cell,oneD,inDen,noco%l_noco,.FALSE.,.FALSE., fix)
......
......@@ -316,6 +316,7 @@ CONTAINS
idx = find_first_normal(vx_tmp)+1
vx_tmp(:,:idx) = 0.0
CALL xc_f03_lda_vxc(initial_lda_func(jspins), idx, TRANSPOSE(rh(:idx,:)), vx_tmp(:,:idx))
else
CALL xc_f03_lda_vxc(initial_lda_func(jspins), SIZE(rh,1), TRANSPOSE(rh), vx_tmp)
......@@ -327,7 +328,6 @@ CONTAINS
ENDIF
vx=TRANSPOSE(vx_tmp)
vxc=TRANSPOSE(vxc_tmp)
#endif
END SUBROUTINE xcpot_get_vxc
......
......@@ -138,22 +138,6 @@ CONTAINS
CALL vmt_xc(mpi, sphhar, atoms, den, xcpot, input, sym, &
EnergyDen, vTot, vx, exc)
if(allocated(xcpot%kinED%mt) .and. allocated(xcpot%kinED%is)) then
call integrate_realspace(xcpot, atoms, sym, sphhar, input, stars, cell, oneD,&
vacuum, noco, xcpot%kinED%mt, xcpot%kinED%is, "kinED")
endif
if(allocated(xcpot%lapl%mt) .and. allocated(xcpot%lapl%is)) then
call integrate_realspace(xcpot, atoms, sym, sphhar, input, stars, cell, oneD,&
vacuum, noco, xcpot%lapl%mt, xcpot%lapl%is, "laplace")
endif
if(allocated(xcpot%lapl%mt) .and. allocated(xcpot%lapl%is) .and. &
allocated(xcpot%kinED%mt) .and. allocated(xcpot%kinED%is)) then
tmp_mt = xcpot%kinED%mt + 0.25 * xcpot%lapl%mt
tmp_is = xcpot%kinED%is + 0.25 * xcpot%lapl%is
call integrate_realspace(xcpot, atoms, sym, sphhar, input, stars, cell, oneD,&
vacuum, noco, tmp_mt, tmp_is, "corrected kinED")
endif
! add MT EXX potential to vr
IF (mpi%irank == 0) THEN
CALL timestop("Vxc in MT")
......
......@@ -23,10 +23,6 @@ CONTAINS
#ifdef CPP_LIBXC
REAL, PARAMETER :: eps = 1e-15
write (*, *) "interstitial"
write (*, *) "ED_is min max", minval(EnergyDen_RS), maxval(EnergyDen_RS)
write (*, *) "den min max", minval(den_rs), maxval(den_rs)
write (*, *) "vTot_is", minval(vTot_rs), maxval(vTot_rs)
kinEnergyDen_RS = EnergyDen_RS - vTot_RS * den_RS
#else
CALL juDFT_error("MetaGGA require LibXC",hint="compile Fleur with LibXC (e.g. by giving '-external libxc' to ./configure")
......@@ -42,13 +38,6 @@ CONTAINS
REAL, INTENT(inout) :: kinEnergyDen_RS(:,:)
#ifdef CPP_LIBXC
write (*, *) "muffin-tin"
write (*, *) "ED_mt min max", minval(EnergyDen_RS), maxval(EnergyDen_RS)
write (*, *) "vTot0_mt min max", minval(vTot0_rs), maxval(vTot0_rs)
write (*, *) "core_den min max", minval(core_den_rs), maxval(core_den_rs)
write (*, *) "vTot_mt", minval(vTot_rs), maxval(vTot_rs)
write (*, *) "val_den min max", minval(val_den_rs), maxval(val_den_rs)
kinEnergyDen_RS = EnergyDen_RS - (vTot0_rs * core_den_rs + vTot_rs * val_den_rs)
#else
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