From edc9218bdddbf22cbf324ed5eab9713c2846a3a9 Mon Sep 17 00:00:00 2001 From: Jae-Mo Lihm Date: Thu, 26 Aug 2021 12:50:19 +0900 Subject: [PATCH] Improve comments of DFPT solve routines --- PHonon/PH/rho_response.f90 | 9 +++++++++ PHonon/PH/solve_e_fpol.f90 | 2 +- PHonon/PH/solve_linter.f90 | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/PHonon/PH/rho_response.f90 b/PHonon/PH/rho_response.f90 index 3e8cbaa55..4fce720a2 100644 --- a/PHonon/PH/rho_response.f90 +++ b/PHonon/PH/rho_response.f90 @@ -16,6 +16,15 @@ SUBROUTINE nonint_rho_response(first_iter, time_reversed, npert, lrdvpsi, iudvps !! non-interacting susceptibility. Solve Sternheimer equation !! (H - e) * dpsi = dvpsi = -P_c+ * (dV_bare + dV_ind) * psi. !! + !! Perfoms the following tasks: + !! a) reads the bare potential term Delta V | psi > from buffer iudvpsi. + !! b) adds to it the screening term Delta V_{SCF} | psi >. + !! If lda_plus_u=.true. compute also the SCF part + !! of the response Hubbard potential. + !! c) applies P_c^+ (orthogonalization to valence states). + !! d) calls cgsolve_all to solve the linear system. + !! e) returns the Delta rho, and if lda_plus_u=.true. also return dbecsum + !! !! dV_bare * psi is read from buffer iudvpsi, so they must be already calculated. !! dV_ind is given by input dvscfins, and dV_ind * psi is calculated in apply_dpot_bands. !! diff --git a/PHonon/PH/solve_e_fpol.f90 b/PHonon/PH/solve_e_fpol.f90 index 638cebb1e..d480e1195 100644 --- a/PHonon/PH/solve_e_fpol.f90 +++ b/PHonon/PH/solve_e_fpol.f90 @@ -16,7 +16,7 @@ subroutine solve_e_fpol ( iw ) ! a) computes the bare potential term x | psi > ! b) adds to it the screening term Delta V_{SCF} | psi > ! c) applies P_c^+ (orthogonalization to valence states) - ! d) calls cgsolve_all to solve the linear system + ! d) calls gmressolve_all to solve the linear system ! e) computes Delta rho, Delta V_{SCF} and symmetrizes them ! USE kinds, ONLY : DP diff --git a/PHonon/PH/solve_linter.f90 b/PHonon/PH/solve_linter.f90 index ca8f036c2..d84573486 100644 --- a/PHonon/PH/solve_linter.f90 +++ b/PHonon/PH/solve_linter.f90 @@ -30,6 +30,7 @@ SUBROUTINE solve_linter (irr, imode0, npe, drhoscf) ! isolv = 2 needs the time-reversed wave functions). For the ! theoretical background, please refer to Phys. Rev. B 100, ! 045115 (2019) + ! Step b, c, d are done inside nonint_rho_response. ! USE kinds, ONLY : DP USE ions_base, ONLY : nat