20template <
typename T,
typename Device = base_device::DEVICE_CPU>
151 void dot(
const int& n,
const Real* x,
const int& incx,
const Real* y,
const int& incy,
Real& result);
A class to treat the Chebyshev expansion.
Definition math_chebyshev.h:84
Special pw_basis class. It includes different k-points.
Definition pw_basis_k.h:57
Stochastic_Iter()
Definition test_hsolver_sdft.cpp:97
double mu0
Definition sto_iter.h:122
bool change
Definition sto_iter.h:123
void sum_stoeband(Stochastic_WF< T, Device > &stowf, elecstate::ElecStatePW< T, Device > *pes, hamilt::Hamilt< T, Device > *pHamilt, ModulePW::PW_Basis_K *wfc_basis)
sum demet and eband energies for each k point and each band
Definition test_hsolver_sdft.cpp:167
Real * spolyv
Definition sto_iter.h:125
bool check
Definition sto_iter.h:130
void init(K_Vectors *pkv_in, ModulePW::PW_Basis_K *wfc_basis, Stochastic_WF< T, Device > &stowf, StoChe< Real, Device > &stoche, hamilt::HamiltSdftPW< T, Device > *p_hamilt_sto)
init for iteration process of SDFT
Definition test_hsolver_sdft.cpp:108
hamilt::HamiltSdftPW< T, Device > * p_hamilt_sto
Definition sto_iter.h:120
void calPn(const int &ik, Stochastic_WF< T, Device > &stowf)
Definition test_hsolver_sdft.cpp:143
void itermu(const int iter, elecstate::ElecState *pes)
solve ne(mu) = ne_target and get chemical potential mu
Definition test_hsolver_sdft.cpp:151
const base_device::DEVICE_CPU * cpu_ctx
Definition sto_iter.h:154
~Stochastic_Iter()
Definition test_hsolver_sdft.cpp:105
void check_precision(const double ref, const double thr, const std::string info)
check precision of Chebyshev expansion
Definition sto_iter.cpp:222
void cal_storho(const UnitCell &ucell, Stochastic_WF< T, Device > &stowf, elecstate::ElecStatePW< T, Device > *pes, ModulePW::PW_Basis_K *wfc_basis)
calculate the density
Definition test_hsolver_sdft.cpp:178
int * nchip
Definition sto_iter.h:129
Sto_Func< double > stofunc
Definition sto_iter.h:119
void calHsqrtchi(Stochastic_WF< T, Device > &stowf)
Definition test_hsolver_sdft.cpp:159
Real * spolyv_cpu
Definition sto_iter.h:126
void calTnchi_ik(const int &ik, Stochastic_WF< T, Device > &stowf)
Definition sto_iter.cpp:741
typename container::PsiToContainer< Device >::type ct_Device
Definition sto_iter.h:155
double th_ne
Definition sto_iter.h:131
ModuleBase::Chebyshev< double, Device > * p_che
Definition sto_iter.h:117
void dot(const int &n, const Real *x, const int &incx, const Real *y, const int &incy, Real &result)
return cpu dot result
Definition sto_iter.cpp:29
K_Vectors * pkv
Definition sto_iter.h:144
double targetne
Definition sto_iter.h:124
double KS_ne
Definition sto_iter.h:132
void checkemm(const int &ik, const int istep, const int iter, Stochastic_WF< T, Device > &stowf)
check emax and emin
Definition test_hsolver_sdft.cpp:132
int method
Definition sto_iter.h:135
double calne(elecstate::ElecState *pes)
calculate total number of electrons
Definition sto_iter.cpp:437
const Device * ctx
Definition sto_iter.h:153
void orthog(const int &ik, psi::Psi< T, Device > &psi, Stochastic_WF< T, Device > &stowf)
orthogonalize stochastic wave functions with KS wave functions
Definition test_hsolver_sdft.cpp:121
typename GetTypeReal< T >::type Real
Definition sto_iter.h:24
Definition elecstate_pw.h:17
Definition elecstate.h:15
Definition hamilt_sdft_pw.h:11
T type
Definition macros.h:8
Definition math_kernel_op.h:192
Definition memory_op.h:61
Definition memory_op.h:77
Definition memory_op.h:17
Definition memory_op.h:31
Definition memory_op.h:45
T type
Definition tensor_types.h:114
double ref(const std::vector< double > &a, const std::vector< double > &n)
Definition test_partition.cpp:63