|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
Projected conjugate-gradient solver of the Sternheimer equation (C2). More...
#include <dfpt_stern.h>
Classes | |
| class | LinearOperator |
Public Member Functions | |
| DFPT_Stern () | |
| ~DFPT_Stern () | |
| int | solve (const LinearOperator &aop, const std::vector< std::vector< std::complex< double > > > &occ_kq, const std::vector< std::complex< double > > &b, int max_iter, double conv_thr, std::vector< std::complex< double > > &dpsi, double &residual) const |
| Solve one projected Sternheimer system with conjugate gradients. | |
Private Member Functions | |
| void | apply_pv (const std::vector< std::vector< std::complex< double > > > &occ_kq, const std::vector< std::complex< double > > &x, std::vector< std::complex< double > > &px) const |
Projected conjugate-gradient solver of the Sternheimer equation (C2).
Solves the insulating valence response (H(k+q) - eps_n) P_c |dpsi_n> = -P_c |dV psi_n>, P_c = 1 - sum_{m occ} |u_m(k+q)><u_m(k+q)|, entirely inside the complement of the occupied states at k+q (the metallic occupation / dmu branch is reserved for C4).
The shifted Hamiltonian action is injected through LinearOperator so the solver core stays decoupled from the ground-state operator chain: the production adapter (DFPT_HamiltShift, dfpt_hamilt_shift.h) builds the (H(k+q) - eps) action itself on the k+q basis rather than reusing hamilt::Hamilt::ops->hPsi (a potential future refactor to shrink the reimplementation surface); unit tests supply analytic operators.
| ModuleDFPT::DFPT_Stern::DFPT_Stern | ( | ) |
| ModuleDFPT::DFPT_Stern::~DFPT_Stern | ( | ) |
|
private |
P_c x by modified Gram-Schmidt against the occupied states; safe for px to alias x (projection coefficients are collected before subtracting)
| int ModuleDFPT::DFPT_Stern::solve | ( | const LinearOperator & | aop, |
| const std::vector< std::vector< std::complex< double > > > & | occ_kq, | ||
| const std::vector< std::complex< double > > & | b, | ||
| int | max_iter, | ||
| double | conv_thr, | ||
| std::vector< std::complex< double > > & | dpsi, | ||
| double & | residual ) const |
Solve one projected Sternheimer system with conjugate gradients.
| aop | shifted Hamiltonian (H(k+q) - eps_n), Hermitian |
| occ_kq | orthonormal occupied states at k+q (may be empty) |
| b | right-hand side -dV|psi_n>; projected internally |
| max_iter | linear-solver iteration cap (> 0) |
| conv_thr | relative residual threshold ||P_c r|| / ||P_c b|| |
| dpsi | output P_c|dpsi_n> (zero inside the occ subspace) |
| residual | achieved relative residual |
< empirical parameter: rhs norm floor for the homogeneous case