ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
exx_helper.h
Go to the documentation of this file.
1//
2// For EXX in PW.
3//
4#include "source_psi/psi.h"
8
9#ifndef EXX_HELPER_H
10#define EXX_HELPER_H
11template <typename T, typename Device>
13{
14 using Real = typename GetTypeReal<T>::type;
16
17 public:
18 Exx_Helper() = default;
19 OperatorEXX *op_exx = nullptr;
20
21 void set_firstiter(bool flag = true) { first_iter = flag; }
22 void set_wg(const ModuleBase::matrix *wg_) { wg = wg_; }
23 void set_psi(psi::Psi<T, Device> *psi_);
24
25 void set_op()
26 {
28 set_psi(psi);
30 }
31
32 bool exx_after_converge(int &iter);
33
35
36 private:
37 bool first_iter = false;
39 const ModuleBase::matrix *wg = nullptr;
40
41};
42#endif // EXX_HELPER_H
Definition matrix.h:19
Definition op_exx_pw.h:24
bool first_iter
Definition op_exx_pw.h:56
void set_wg(const ModuleBase::matrix *wg_in)
Definition op_exx_pw.h:52
Definition psi.h:37
Definition exx_lip.h:23
Definition exx_helper.h:13
bool exx_after_converge(int &iter)
Definition exx_helper.cpp:11
void set_psi(psi::Psi< T, Device > *psi_)
Definition exx_helper.cpp:32
bool first_iter
Definition exx_helper.h:37
double cal_exx_energy(psi::Psi< T, Device > *psi_)
Definition exx_helper.cpp:4
const ModuleBase::matrix * wg
Definition exx_helper.h:39
void set_wg(const ModuleBase::matrix *wg_)
Definition exx_helper.h:22
void set_op()
Definition exx_helper.h:25
typename GetTypeReal< T >::type Real
Definition exx_helper.h:14
void set_firstiter(bool flag=true)
Definition exx_helper.h:21
Exx_Helper()=default
OperatorEXX * op_exx
Definition exx_helper.h:19
T type
Definition macros.h:8