|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
Plane-wave basis at the perturbation wavevector k+q. More...
#include <dfpt_kq_basis.h>
Public Member Functions | |
| DFPT_KQ_Basis () | |
| ~DFPT_KQ_Basis () | |
| void | init (const ModulePW::PW_Basis_K *pw_wfc, const ModulePW::PW_Basis *pw_rho, const ModuleBase::Vector3< double > &q_cart, int ik) |
| Enumerate the local (per-processor) k+q plane-wave basis. | |
| void | clear () |
| bool | is_valid () const |
| number of k+q plane waves on this processor | |
| int | get_npwk () const |
| int | get_ig_rho (int igl) const |
| G in Cartesian coordinates. | |
| ModuleBase::Vector3< double > | get_gcar (int igl) const |
| G + (k+q) in Cartesian coordinates. | |
| ModuleBase::Vector3< double > | get_gpluskq (int igl) const |
| |G + (k+q)|^2 in units of 1/lat0^2 | |
| double | get_gk2 (int igl) const |
| k+q wavevector in Cartesian coordinates | |
| ModuleBase::Vector3< double > | get_kplusq () const |
| const std::vector< double > & | get_gk2_all () const |
| const std::vector< ModuleBase::Vector3< double > > & | get_gcar_all () const |
Private Attributes | |
| const ModulePW::PW_Basis_K * | pw_wfc_ = nullptr |
| ground-state k-basis | |
| ModuleBase::Vector3< double > | kplusq_c_ |
| k+q in Cartesian coordinates | |
| int | npwk_ = 0 |
| number of k+q plane waves | |
| std::vector< int > | ig_rho_ |
| k+q index -> charge-grid G index | |
| std::vector< double > | gk2_ |
| |G + (k+q)|^2 | |
| std::vector< ModuleBase::Vector3< double > > | gcar_ |
| G in Cartesian coordinates. | |
Plane-wave basis at the perturbation wavevector k+q.
C0: for every (ik, q) pair the first-order response (the Sternheimer solution dpsi) lives in the k+q plane-wave basis. Rather than building a full PW_Basis_K (new FFT grids, MP redistribution) per q, this helper enumerates the k+q ball directly on the shared ground-state FFT grid: every integer G with |G + (k+q)|^2 <= gk_ecut is kept, carried by the single FFT cell that the half-space wrap assigns to it. The scan is exact (cell-to-G is bijective), so the ball layout of neither ground-state grid can silently drop members; a member whose cell lacks a charge-grid G quits with an explicit diagnostic instead (the veff convolution would otherwise zero its coefficient).
Preconditions:
| ModuleDFPT::DFPT_KQ_Basis::DFPT_KQ_Basis | ( | ) |
| ModuleDFPT::DFPT_KQ_Basis::~DFPT_KQ_Basis | ( | ) |
| void ModuleDFPT::DFPT_KQ_Basis::clear | ( | ) |
|
inline |
G + (k+q) in Cartesian coordinates.
|
inline |
|
inline |
k+q wavevector in Cartesian coordinates
|
inline |
|
inline |
|G + (k+q)|^2 in units of 1/lat0^2
|
inline |
G in Cartesian coordinates.
|
inline |
|
inline |
index of the G vector in the charge-density basis (-1 if the shared FFT cell position carries no local rho-grid G)
| void ModuleDFPT::DFPT_KQ_Basis::init | ( | const ModulePW::PW_Basis_K * | pw_wfc, |
| const ModulePW::PW_Basis * | pw_rho, | ||
| const ModuleBase::Vector3< double > & | q_cart, | ||
| int | ik ) |
Enumerate the local (per-processor) k+q plane-wave basis.
| pw_wfc | ground-state k-dependent plane-wave basis (complex) |
| pw_rho | ground-state charge-density plane-wave basis |
| q_cart | perturbation wavevector in Cartesian coordinates |
| ik | index of the ground-state k point |
|
inline |
number of k+q plane waves on this processor
|
private |
G in Cartesian coordinates.
|
private |
|G + (k+q)|^2
|
private |
k+q index -> charge-grid G index
|
private |
k+q in Cartesian coordinates
|
private |
number of k+q plane waves
|
private |
ground-state k-basis