Production adapter of the shifted Sternheimer operator (C7).
More...
#include <dfpt_hamilt_shift.h>
Production adapter of the shifted Sternheimer operator (C7).
Applies y = (H(k+q) - eps_n) x on the k+q plane-wave basis, with the ground-state Hamiltonian assembled from module_dfpt primitives instead of the GS operator chain (which is index-bound to the GS k list):
- kinetic tpiba^2 |G+k+q|^2 (diagonal, DFPT_KQ_Basis)
- local V_eff FFT convolution with the real-space effective potential injected by the esolver after the GS SCF (veff_smooth row, shared FFT grid)
- nonlocal V_nl separable projectors from DFPT_Pert::build_vkb at the k+q center, cached per (k,q) context
- shift -eps_n fixed before each solve All transforms are phase-free on the shared FFT grid (the same convention as DFPT_Pert::real_space_dv), and the k+q scatter/gather goes through the (ix,iy,iz) FFT-cell reverse map (C1 finding: the rho and wfc stick encodings are not interchangeable).
◆ DFPT_HamiltShift() [1/2]
◆ ~DFPT_HamiltShift()
| ModuleDFPT::DFPT_HamiltShift::~DFPT_HamiltShift |
( |
| ) |
|
◆ DFPT_HamiltShift() [2/2]
| ModuleDFPT::DFPT_HamiltShift::DFPT_HamiltShift |
( |
const DFPT_HamiltShift & | | ) |
|
|
delete |
◆ apply()
| void ModuleDFPT::DFPT_HamiltShift::apply |
( |
const std::complex< double > * | x, |
|
|
std::complex< double > * | y ) const |
|
overridevirtual |
◆ basis()
| const DFPT_KQ_Basis & ModuleDFPT::DFPT_HamiltShift::basis |
( |
| ) |
const |
|
inline |
the k+q basis cached by the last set_context (the nscf path reads it for the kinetic preconditioner)
◆ debug_t_vnl()
| double ModuleDFPT::DFPT_HamiltShift::debug_t_vnl |
( |
const std::vector< std::complex< double > > & | x | ) |
const |
debug: <x|T + Vnl|x> without the veff convolution (design-phase validation diagnostics)
◆ debug_v_wfc()
| double ModuleDFPT::DFPT_HamiltShift::debug_v_wfc |
( |
const std::vector< std::complex< double > > & | x | ) |
const |
debug: <x|V|x> through the ground-state wfc-basis k-indexed FFT path (validation of the rho-grid scatter/gather convolution)
◆ dimension()
| int ModuleDFPT::DFPT_HamiltShift::dimension |
( |
| ) |
const |
|
overridevirtual |
◆ operator=()
◆ set_context()
| void ModuleDFPT::DFPT_HamiltShift::set_context |
( |
const ModuleBase::Vector3< double > & | q_cart, |
|
|
int | k_idx ) |
Fix the (k, q) context and cache the k+q projector set; the eigenvalue shift (Ry) is set per solve through set_shift.
◆ set_shift()
| void ModuleDFPT::DFPT_HamiltShift::set_shift |
( |
double | shift | ) |
|
◆ becp_
| std::vector<std::complex<double> > ModuleDFPT::DFPT_HamiltShift::becp_ |
|
mutableprivate |
◆ dbecp_
| std::vector<std::complex<double> > ModuleDFPT::DFPT_HamiltShift::dbecp_ |
|
mutableprivate |
◆ ik_cache_
| int ModuleDFPT::DFPT_HamiltShift::ik_cache_ = 0 |
|
private |
◆ kq2rho_
| std::vector<int> ModuleDFPT::DFPT_HamiltShift::kq2rho_ |
|
private |
projector bookkeeping per type (mu -> (beta index, m channel))
◆ kq_
◆ mu_ib_
| std::vector<std::vector<int> > ModuleDFPT::DFPT_HamiltShift::mu_ib_ |
|
private |
◆ mu_m_
| std::vector<std::vector<int> > ModuleDFPT::DFPT_HamiltShift::mu_m_ |
|
private |
cached beta projectors per atom on the k+q list
◆ nrxx_
| int ModuleDFPT::DFPT_HamiltShift::nrxx_ = 0 |
|
private |
◆ pert_
| const DFPT_Pert* ModuleDFPT::DFPT_HamiltShift::pert_ = nullptr |
|
private |
◆ pw_rho_
◆ pw_wfc_
◆ shift_
| double ModuleDFPT::DFPT_HamiltShift::shift_ = 0.0 |
|
private |
k+q list index -> rho-grid ig (-1 when the cell position carries no rho G; cannot happen with ecutrho >= 4 ecutwfc but kept defensive)
◆ tpiba2_
| double ModuleDFPT::DFPT_HamiltShift::tpiba2_ = 0.0 |
|
private |
◆ ucell_
| const UnitCell* ModuleDFPT::DFPT_HamiltShift::ucell_ = nullptr |
|
private |
◆ veff_r_
| std::vector<double> ModuleDFPT::DFPT_HamiltShift::veff_r_ |
|
private |
◆ vkb_cache_
| std::vector<std::vector<std::vector<std::complex<double> > > > ModuleDFPT::DFPT_HamiltShift::vkb_cache_ |
|
private |
apply-time scratch (apply is const)
◆ x_r_
| std::vector<std::complex<double> > ModuleDFPT::DFPT_HamiltShift::x_r_ |
|
mutableprivate |
◆ x_recip_
| std::vector<std::complex<double> > ModuleDFPT::DFPT_HamiltShift::x_recip_ |
|
mutableprivate |
The documentation for this class was generated from the following files: