1#ifndef HAMILT_HS_ADAPTER_H
2#define HAMILT_HS_ADAPTER_H
21template <
typename T,
typename Device = base_device::DEVICE_CPU>
38 const int nvec)
const override
40 if (
hm_->ops ==
nullptr)
54 const int nvec)
const override
56 hm_->sPsi(x, sx, ld,
npw_, nvec);
Special pw_basis class. It includes different k-points.
Definition pw_basis_k.h:56
void hs_at_k(const int ik, ModuleBase::MatrixBlock< T > &hk, ModuleBase::MatrixBlock< T > &sk) override
Definition hamilt_hs_adapter.h:76
HamiltHSMatrix(Hamilt< T > *hm)
Definition hamilt_hs_adapter.h:74
Hamilt< T > * hm_
Definition hamilt_hs_adapter.h:83
int npw_
number of plane waves of that k point (without npol)
Definition hamilt_hs_adapter.h:63
HamiltHSOperator(Hamilt< T, Device > *hm, const ModulePW::PW_Basis_K *wfc_basis)
Definition hamilt_hs_adapter.h:25
int ik_
k point set by the last update_k()
Definition hamilt_hs_adapter.h:62
void spsi(const T *x, T *sx, const int ld, const int nvec) const override
sx[:, 0:nvec) = S * x[:, 0:nvec), both with leading dimension ld
Definition hamilt_hs_adapter.h:50
void hpsi(const T *x, T *hx, const int ld, const int nvec) const override
hx[:, 0:nvec) = H * x[:, 0:nvec), both with leading dimension ld
Definition hamilt_hs_adapter.h:34
Hamilt< T, Device > * hm_
Definition hamilt_hs_adapter.h:60
void update_k(const int ik) override
switch H and S to k point ik; must precede hpsi()/spsi() for that k
Definition hamilt_hs_adapter.h:27
const ModulePW::PW_Basis_K * wfc_basis_
Definition hamilt_hs_adapter.h:61
std::tuple< const psi::Psi< T, Device > *, const psi::Range, T * > hpsi_info
input type of hPsi: (psi_input, range, hpsi_pointer)
Definition operator.h:53
What a direct (dense) eigensolver needs from the generalized eigenproblem H x = e S x: the matrices H...
Definition hs_matrix.h:19
What an iterative eigensolver needs from the generalized eigenproblem H x = e S x: the ability to app...
Definition hs_operator.h:24
#define T
Definition exp.cpp:237
void WARNING_QUIT(const std::string &, const std::string &)
Combine the functions of WARNING and QUIT.
Definition test_delley.cpp:15
A non-owning description of a matrix stored in memory.
Definition matrix_block.h:23