|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
Diag part of A operator: [AX]_iak = (e_ak - e_ik) X_iak. More...
#include <operator_lr_diag.h>
Public Member Functions | |
| OperatorLRDiag (const double *eig_ks, const Parallel_Blkcyclic &pX_in, const int &nk_in, const int &nocc_in, const int &nvirt_in, const bool add_on) | |
| void | init (const int ik_in) override |
| virtual void | act (const int nbands, const int nbasis, const int npol, const T *psi_in, T *hpsi, const int ngk_ik=0, const bool is_first_node=false) const override |
| Public Member Functions inherited from hamilt::Operator< double, base_device::DEVICE_CPU > | |
| Operator () | |
| virtual | ~Operator () |
| virtual hpsi_info | hPsi (hpsi_info &input) const |
| Core hot-path: compute H|psi> by traversing the operator chain. | |
| virtual void | add (Operator *next) |
| virtual int | get_ik () const |
| virtual void | act (const int nbands, const int nbasis, const int npol, const double *tmpsi_in, double *tmhpsi, const int ngk_ik=0, const bool is_first_node=false) const |
| int | get_act_type () const |
| calculation_type | get_cal_type () const |
Private Attributes | |
| const Parallel_Blkcyclic & | pX |
| ModuleBase::matrix | eig_ks_diff |
| const int | nk = 1 |
| const int | nocc = 1 |
| const int | nvirt = 1 |
| const bool | add_on_ = false |
| Device * | ctx = {} |
Additional Inherited Members | |
| Public Types inherited from hamilt::Operator< double, base_device::DEVICE_CPU > | |
| typedef std::tuple< const psi::Psi< double, base_device::DEVICE_CPU > *, const psi::Range, double * > | hpsi_info |
| input type of hPsi: (psi_input, range, hpsi_pointer) | |
| Public Attributes inherited from hamilt::Operator< double, base_device::DEVICE_CPU > | |
| Operator * | next_op |
| interface type 3: return a Psi-type HPsi | |
| Protected Types inherited from hamilt::Operator< double, base_device::DEVICE_CPU > | |
| using | set_memory_op |
| Protected Member Functions inherited from hamilt::Operator< double, base_device::DEVICE_CPU > | |
| double * | get_hpsi (const hpsi_info &info) const |
| Protected Attributes inherited from hamilt::Operator< double, base_device::DEVICE_CPU > | |
| int | ik |
| int | act_type |
| determine which act() interface would be called in hPsi() | |
| bool | in_place |
| enum calculation_type | cal_type |
| Operator * | next_sub_op |
| bool | is_first_node |
| psi::Psi< double, base_device::DEVICE_CPU > * | hpsi |
| base_device::DEVICE_CPU * | ctx |
Diag part of A operator: [AX]_iak = (e_ak - e_ik) X_iak.
|
inline |
|
inlineoverridevirtual |
By default this ASSIGNS to hpsi, so it has to be the head of its operator list. That is fine for a single-chain Hamiltonian, but an open-shell 2x2 spin-block operator writes into the same output buffer from four chains: the diagonal block of the DOWN channel runs last and its assignment wipes the up->down contribution that the off-diagonal chain wrote earlier. Those callers pass add_on = true and zero the output themselves.
|
inlineoverridevirtual |
Reimplemented from hamilt::Operator< double, base_device::DEVICE_CPU >.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |