ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
hs_operator.h
Go to the documentation of this file.
1#ifndef HSOLVER_HS_OPERATOR_H
2#define HSOLVER_HS_OPERATOR_H
3
5
6namespace hsolver
7{
8
22template <typename T, typename Device = base_device::DEVICE_CPU>
24{
25 public:
26 virtual ~HSOperator() = default;
27
29 virtual void update_k(const int ik) = 0;
30
32 virtual void hpsi(const T* x, T* hx, const int ld, const int nvec) const = 0;
33
35 virtual void spsi(const T* x, T* sx, const int ld, const int nvec) const = 0;
36
40 virtual void add_to_subspace_h(T* hcc, const int n) const
41 {
42 }
43
47 virtual void export_subspace_vec(const T* vcc, const int n, const int nband) const
48 {
49 }
50};
51
52} // namespace hsolver
53
54#endif // HSOLVER_HS_OPERATOR_H
What an iterative eigensolver needs from the generalized eigenproblem H x = e S x: the ability to app...
Definition hs_operator.h:24
virtual ~HSOperator()=default
virtual void add_to_subspace_h(T *hcc, const int n) const
Definition hs_operator.h:40
virtual void hpsi(const T *x, T *hx, const int ld, const int nvec) const =0
hx[:, 0:nvec) = H * x[:, 0:nvec), both with leading dimension ld
virtual void spsi(const T *x, T *sx, const int ld, const int nvec) const =0
sx[:, 0:nvec) = S * x[:, 0:nvec), both with leading dimension ld
virtual void export_subspace_vec(const T *vcc, const int n, const int nband) const
Definition hs_operator.h:47
virtual void update_k(const int ik)=0
switch H and S to k point ik; must precede hpsi()/spsi() for that k
#define T
Definition exp.cpp:237
Definition dense_eigensolver.cpp:23