ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
hamilt_pw.h
Go to the documentation of this file.
1#ifndef HAMILTPW_H
2#define HAMILTPW_H
3
5#include "source_cell/klist.h"
12
13namespace hamilt
14{
15
16template <typename T, typename Device = base_device::DEVICE_CPU>
17class HamiltPW : public Hamilt<T, Device>
18{
19 private:
20 // Note GetTypeReal<T>::type will
21 // return T if T is real type(float, double),
22 // otherwise return the real type of T(complex<float>, std::complex<double>)
23 using Real = typename GetTypeReal<T>::type;
24 public:
26 template<typename T_in, typename Device_in = Device>
28 ~HamiltPW();
29
30 // for target K point, update consequence of hPsi() and matrix()
31 void updateHk(const int ik) override;
32
33 void sPsi(const T* psi_in, // psi
34 T* spsi, // spsi
35 const int nrow, // dimension of spsi: nbands * nrow
36 const int npw, // number of plane waves
37 const int nbands // number of bands
38 ) const override;
39
40 void set_exx_helper(Exx_Helper<T, Device>& exx_helper_in);
41
42protected:
43 // used in sPhi, which are calculated in hPsi or sPhi
44 const pseudopot_cell_vnl* ppcell = nullptr;
45 const UnitCell* const ucell = nullptr;
46 mutable T* vkb = nullptr;
47 Real* qq_nt = nullptr;
48 T* qq_so = nullptr;
49
50 Device* ctx = {};
57};
58
59} // namespace hamilt
60
61#endif
Definition klist.h:13
Special pw_basis class. It includes different k-points.
Definition pw_basis_k.h:57
Definition unitcell.h:16
Definition potential_new.h:48
Definition hamilt_pw.h:18
const UnitCell *const ucell
Definition hamilt_pw.h:45
T * vkb
Definition hamilt_pw.h:46
void updateHk(const int ik) override
for target K point, update consequence of hPsi() and matrix()
Definition hamilt_pw.cpp:148
const pseudopot_cell_vnl * ppcell
Definition hamilt_pw.h:44
typename GetTypeReal< T >::type Real
Definition hamilt_pw.h:23
Real * qq_nt
Definition hamilt_pw.h:47
T * qq_so
Definition hamilt_pw.h:48
Device * ctx
Definition hamilt_pw.h:50
~HamiltPW()
Definition hamilt_pw.cpp:139
void set_exx_helper(Exx_Helper< T, Device > &exx_helper_in)
Definition hamilt_pw.cpp:385
void sPsi(const T *psi_in, T *spsi, const int nrow, const int npw, const int nbands) const override
Definition hamilt_pw.cpp:236
Definition hamilt.h:16
Definition VNL_in_pw.h:21
#define T
Definition exp.cpp:237
Definition hamilt.h:12
Definition exx_helper.h:13
T type
Definition macros.h:8
Definition math_kernel_op.h:217
Definition math_kernel_op.h:192
Definition memory_op.h:77
Definition memory_op.h:17
Definition memory_op.h:31