ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
ModuleDFPT::DFPT_Stern Class Reference

Projected conjugate-gradient solver of the Sternheimer equation (C2). More...

#include <dfpt_stern.h>

Collaboration diagram for ModuleDFPT::DFPT_Stern:

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

Detailed Description

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.

Constructor & Destructor Documentation

◆ DFPT_Stern()

ModuleDFPT::DFPT_Stern::DFPT_Stern ( )

◆ ~DFPT_Stern()

ModuleDFPT::DFPT_Stern::~DFPT_Stern ( )

Member Function Documentation

◆ apply_pv()

void ModuleDFPT::DFPT_Stern::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
private

P_c x by modified Gram-Schmidt against the occupied states; safe for px to alias x (projection coefficients are collected before subtracting)

Here is the call graph for this function:
Here is the caller graph for this function:

◆ solve()

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.

Parameters
aopshifted Hamiltonian (H(k+q) - eps_n), Hermitian
occ_kqorthonormal occupied states at k+q (may be empty)
bright-hand side -dV|psi_n>; projected internally
max_iterlinear-solver iteration cap (> 0)
conv_thrrelative residual threshold ||P_c r|| / ||P_c b||
dpsioutput P_c|dpsi_n> (zero inside the occ subspace)
residualachieved relative residual
Returns
number of iterations used

< empirical parameter: rhs norm floor for the homogeneous case

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: