Commit 6a510ff3 authored by Matthias Redies's avatar Matthias Redies

remove unnecessary operations

parent 459809f8
...@@ -5,19 +5,12 @@ ...@@ -5,19 +5,12 @@
!-------------------------------------------------------------------------------- !--------------------------------------------------------------------------------
MODULE m_metagga MODULE m_metagga
PUBLIC :: calc_EnergyDen PUBLIC :: calc_EnergyDen
PRIVATE :: calc_EnergyDen_auxillary_weights, subtract_RS, multiply_RS PRIVATE :: calc_EnergyDen_auxillary_weights
type t_RS_potden type t_RS_potden
REAL, ALLOCATABLE :: is(:,:), mt(:,:) REAL, ALLOCATABLE :: is(:,:), mt(:,:)
end type t_RS_potden end type t_RS_potden
INTERFACE OPERATOR (-)
PROCEDURE subtract_RS
END INTERFACE OPERATOR (-)
INTERFACE OPERATOR (*)
PROCEDURE multiply_RS
END INTERFACE OPERATOR (*)
CONTAINS CONTAINS
SUBROUTINE calc_kinEnergyDen(EnergyDen_rs, vTot_rs, den_rs, kinEnergyDen_RS) SUBROUTINE calc_kinEnergyDen(EnergyDen_rs, vTot_rs, den_rs, kinEnergyDen_RS)
#ifdef CPP_LIBXC #ifdef CPP_LIBXC
...@@ -132,84 +125,3 @@ CONTAINS ...@@ -132,84 +125,3 @@ CONTAINS
f_ik(:,ikpt) = e_i * w_i f_ik(:,ikpt) = e_i * w_i
ENDDO ENDDO
END SUBROUTINE calc_EnergyDen_auxillary_weights END SUBROUTINE calc_EnergyDen_auxillary_weights
!SUBROUTINE transform_to_grid(input, noco, sym, stars, cell, den, atoms, sphhar, EnergyDen, vTot, den_RS, EnergyDen_RS, vTot_RS)
!USE m_types_potden
!USE m_types_setup
!USE m_types_xcpot_libxc
!USE m_types_xcpot
!USE m_juDFT_stop
!USE m_pw_tofrom_grid
!USE m_mt_tofrom_grid
!IMPLICIT NONE
!TYPE(t_potden), INTENT(in) :: den, EnergyDen, vTot
!TYPE(t_input), INTENT(in) :: input
!TYPE(t_noco), INTENT(in) :: noco
!TYPE(t_sym), INTENT(in) :: sym
!TYPE(t_stars), INTENT(in) :: stars
!TYPE(t_cell), INTENT(in) :: cell
!TYPE(t_atoms), INTENT(in) :: atoms
!TYPE(t_sphhar), INTENT(in) :: sphhar
!REAL(:,:), INTENT(out) :: den_RS, EnergyDen_RS, vTot_RS ! could be changed to a real-space type
!!local vars
!TYPE(t_xcpot_libxc) ::aux_xcpot
!TYPE(t_gradients) :: tmp_grad
!INTEGER, PARAMETER :: id_corr = 9, id_exch = 1
!INTEGER :: nsp, n
!!make some auxillary xcpot, that is not a GGA (we don't need gradients)
!CALL aux_xcpot%init(input%jspins, id_exch, id_corr, id_exch, id_corr)
!IF(aux_xcpot%vxc_is_gga()) CALL juDFT_error("aux_xcpot must not be GGA", &
!hint="choose id_corr and id_exch correctly")
!! interstitial part
!CALL init_pw_grid(aux_xcpot,stars,sym,cell)
!CALL pw_to_grid(aux_xcpot, input%jspins, noco%l_noco, stars, cell, den%pw, tmp_grad, den_RS%is)
!CALL pw_to_grid(aux_xcpot, input%jspins, noco%l_noco, stars, cell, EnergyDen%pw, tmp_grad, EnergyDen_RS%is)
!CALL pw_to_grid(aux_xcpot, input%jspins, noco%l_noco, stars, cell, vTot%pw, tmp_grad, vTot_RS%is)
!CALL finish_pw_grid()
!! muffin tins
!nsp=(atoms%lmaxd+1+MOD(atoms%lmaxd+1,2))*(2*atoms%lmaxd+1)
!CALL init_mt_grid(nsp,input%jspins,atoms,sphhar,aux_xcpot,sym)
!DO n = 1,atoms%ntype
!CALL mt_to_grid(aux_xcpot, input%jspins, atoms, sphhar, den%mt(:,0:,n,:), &
!nsp, n, tmp_grad, den_RS%mt)
!CALL mt_to_grid(aux_xcpot, input%jspins, atoms, sphhar, EnergyDen%mt(:,0:,n,:), &
!nsp, n, tmp_grad, EnergyDen_RS%mt)
!CALL mt_to_grid(aux_xcpot, input%jspins, atoms, sphhar, vTot%mt(:,0:,n,:), &
!nsp, n, tmp_grad, vTot_RS%mt)
!ENDDO
!CALL finish_mt_grid()
!END SUBROUTINE transform_to_grid
FUNCTION subtract_RS(rs1, rs2) RESULT(rs_out)
USE m_types_xcpot
IMPLICIT NONE
TYPE(t_RS_potden), INTENT(in) :: rs1, rs2
TYPE(t_RS_potden) :: rs_out
rs_out%is = rs1%is - rs2%is
rs_out%mt = rs1%mt - rs2%mt
END FUNCTION subtract_RS
FUNCTION multiply_RS(rs1, rs2) RESULT(rs_out)
USE m_types_xcpot
IMPLICIT NONE
TYPE(t_RS_potden), INTENT(in) :: rs1, rs2
TYPE(t_RS_potden) :: rs_out
rs_out%is = rs1%is * rs2%is
rs_out%mt = rs1%mt * rs2%mt
END FUNCTION multiply_RS
END MODULE m_metagga
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