From 6a510ff33d38108c867f431d0a71fb2dd18a790b Mon Sep 17 00:00:00 2001 From: Matthias Redies Date: Fri, 26 Oct 2018 10:46:23 +0200 Subject: [PATCH] remove unnecessary operations --- xc-pot/metagga.F90 | 90 +--------------------------------------------- 1 file changed, 1 insertion(+), 89 deletions(-) diff --git a/xc-pot/metagga.F90 b/xc-pot/metagga.F90 index ae46748b..dec90386 100644 --- a/xc-pot/metagga.F90 +++ b/xc-pot/metagga.F90 @@ -5,19 +5,12 @@ !-------------------------------------------------------------------------------- MODULE m_metagga PUBLIC :: calc_EnergyDen - PRIVATE :: calc_EnergyDen_auxillary_weights, subtract_RS, multiply_RS + PRIVATE :: calc_EnergyDen_auxillary_weights type t_RS_potden REAL, ALLOCATABLE :: is(:,:), mt(:,:) end type t_RS_potden - INTERFACE OPERATOR (-) - PROCEDURE subtract_RS - END INTERFACE OPERATOR (-) - - INTERFACE OPERATOR (*) - PROCEDURE multiply_RS - END INTERFACE OPERATOR (*) CONTAINS SUBROUTINE calc_kinEnergyDen(EnergyDen_rs, vTot_rs, den_rs, kinEnergyDen_RS) #ifdef CPP_LIBXC @@ -132,84 +125,3 @@ CONTAINS f_ik(:,ikpt) = e_i * w_i ENDDO 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 -- 2.22.0