22 template <
typename T,
typename Device>
26template<
typename T,
typename Device = base_device::DEVICE_CPU>
58 void set_hvec(
const int ik,
const T*
const hvec,
const int naos,
const int nbands)
60 memcpy(&(*this->
k_pack->hvec_array)(ik, 0, 0), hvec,
sizeof(
T) * naos * nbands);
64 return *this->
k_pack->hvec_array;
87 std::vector<std::vector<T>>
phi;
88 std::vector<std::vector<std::vector<T>>>
psi;
94 std::vector<std::vector<T>>
sum3;
103 void qkg2_exp(
const int ik,
const int iq);
104 void b_cal(
const int ik,
int iq,
const int ib);
105 void sum3_cal(
const int iq,
const int ib);
106 void b_sum(
const int iq,
const int ib);
int gzero_rank_in_pool
Definition exx_lip.h:69
std::vector< T > b
Definition exx_lip.h:91
std::vector< std::vector< T > > phi
Definition exx_lip.h:87
int iq_vecik
Definition exx_lip.h:85
const UnitCell * ucell_ptr
Definition exx_lip.h:116
struct Exx_Lip::k_package * q_pack
struct Exx_Lip::k_package * k_pack
const Exx_Info_Lip & info
Definition exx_lip.h:34
void sum_all(const int ik)
Definition exx_lip.hpp:418
void b_sum(const int iq, const int ib)
Definition exx_lip.hpp:401
psi::Psi< T, Device > get_hvec() const
Definition exx_lip.h:62
const std::vector< std::vector< std::vector< T > > > & get_exx_matrix() const
Definition exx_lip.h:47
void cal_exx()
Definition exx_lip.hpp:32
Treal exx_energy
Definition exx_lip.h:97
const ModulePW::PW_Basis_K * wfc_basis
Definition exx_lip.h:114
Exx_Lip(const Exx_Info_Lip &info_in)
void write_q_pack() const
Definition exx_lip.hpp:474
const T two_pi_i
Definition exx_lip.h:111
void exx_energy_cal()
Definition exx_lip.hpp:452
~Exx_Lip()
Definition exx_lip.hpp:166
void set_hvec(const int ik, const T *const hvec, const int naos, const int nbands)
Definition exx_lip.h:58
std::vector< Treal > recip_qkg2
Definition exx_lip.h:89
void qkg2_exp(const int ik, const int iq)
Definition exx_lip.hpp:314
typename GetTypeReal< T >::type Treal
Definition exx_lip.h:29
std::vector< std::vector< std::vector< T > > > exx_matrix
Definition exx_lip.h:96
void phi_cal(k_package *kq_pack, const int ikq)
Definition exx_lip.hpp:204
std::vector< T > sum1
Definition exx_lip.h:93
void wf_wg_cal()
Definition exx_lip.hpp:186
std::vector< std::vector< T > > sum3
Definition exx_lip.h:94
void judge_singularity(const int ik)
Definition exx_lip.hpp:290
std::vector< T > b0
Definition exx_lip.h:92
void sum3_cal(const int iq, const int ib)
Definition exx_lip.hpp:389
Treal sum2_factor
Definition exx_lip.h:90
Treal get_exx_energy() const
Definition exx_lip.h:51
void b_cal(const int ik, int iq, const int ib)
Definition exx_lip.hpp:345
void psi_cal()
Definition exx_lip.hpp:233
const ModulePW::PW_Basis * rho_basis
Definition exx_lip.h:113
Class for k-points management.
Definition klist.h:20
Special pw_basis class. It includes different k-points.
Definition pw_basis_k.h:56
A class which can convert a function of "r" to the corresponding linear superposition of plane waves ...
Definition pw_basis.h:60
Provide the basic information about unitcell.
Definition unitcell.h:16
Definition elecstate.h:20
#define T
Definition exp.cpp:237
const double TWO_PI
Definition constants.h:21
Definition read_atoms_hlp_test.cpp:13
Definition diag_lcao.h:14
Definition exx_info_lip.h:7
const elecstate::ElecState * pelec
Definition exx_lip.h:82
psi::Psi< T, Device > * kspw_psi_ptr
PW wavefunction.
Definition exx_lip.h:76
K_Vectors * kv_ptr
Definition exx_lip.h:74
psi::Psi< T, Device > * psi_local
NAOs in PW.
Definition exx_lip.h:77
psi::Psi< T, Device > * hvec_array
LCAO wavefunction, the eigenvectors from lapack diagonalization.
Definition exx_lip.h:81
ModuleBase::matrix wf_wg
Definition exx_lip.h:78
T type
Definition macros.h:8