File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 * Separates the linear algebra of lambda updates, constraint matrix handling,
88 * and residual computation from the basis-specific Hamiltonian application
99 * and gamma computation.
10+ *
11+ * Currently only compute_dp_escon() is used (by LCAO). The other functions
12+ * are kept for future constraint-matrix / total-mode refactoring.
1013 */
1114
1215#include < vector>
@@ -27,6 +30,9 @@ namespace deltap_common {
2730 * @param mixing Damping factor (0 = no mixing, 1 = full step).
2831 * @param lambda_out Effective per-atom lambda [n_atoms] (output).
2932 * @return Max residual norm (for convergence check).
33+ * @note This function is currently unused — both LCAO and PW paths
34+ * implement lambda updates inline. Kept for future total/constraint-matrix
35+ * refactoring.
3036 */
3137inline double update_lambda (
3238 const std::vector<std::vector<double >>& C,
Original file line number Diff line number Diff line change 33/* *
44 * @file deltap_solver.h
55 * @brief Solver callback interface for DeltaP inner loop.
6+ * @deprecated This file is not used by any code path. The inner-loop
7+ * logic for both LCAO and PW is implemented directly in the ESolver
8+ * classes (esolver_ks_lcao.cpp, deltap_pw.cpp). This file may be
9+ * removed in a future cleanup.
10+ */
611 *
712 * The inner BFGS loop needs to apply trial lambda values and re-solve
813 * the KS equation with frozen charge density. This is basis-specific:
Original file line number Diff line number Diff line change @@ -75,10 +75,15 @@ bool run_deltap_lambda_loop(const int iter,
7575 const double drho,
7676 const Input_para& inp)
7777{
78- if (!inp.deltap_switch )
78+ if (!inp.deltap_switch || !inp. deltap_corr )
7979 return false ;
8080
8181 set_deltap_pw_active (true );
82+
83+ // Phase A: no inner loop — always run normal HSolver.
84+ // Lambda is updated in deltap_iter_finish() after charge convergence.
85+ // Phase D (deferred): inner BFGS with subspace diag, would return true
86+ // to skip HSolver and run cal_hs_subspace + diag_responce instead.
8287 return false ;
8388}
8489
You can’t perform that action at this time.
0 commit comments