ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
LR::OperatorLRDiag< T, Device > Class Template Reference

Diag part of A operator: [AX]_iak = (e_ak - e_ik) X_iak. More...

#include <operator_lr_diag.h>

Inheritance diagram for LR::OperatorLRDiag< T, Device >:
Collaboration diagram for LR::OperatorLRDiag< T, Device >:

Public Member Functions

 OperatorLRDiag (const double *eig_ks, const Parallel_2D &pX_in, const int &nk_in, const int &nocc_in, const int &nvirt_in)
 
void init (const int ik_in) override
 
virtual void act (const int nbands, const int nbasis, const int npol, const T *psi_in, T *hpsi, const int ngk_ik=0, const bool is_first_node=false) const override
 
- Public Member Functions inherited from hamilt::Operator< T, Device >
 Operator ()
 
virtual ~Operator ()
 
virtual hpsi_info hPsi (hpsi_info &input) const
 
virtual void add (Operator *next)
 
virtual int get_ik () const
 
virtual void act (const psi::Psi< T, Device > &psi_in, psi::Psi< T, Device > &psi_out, const int nbands) const
 
int get_act_type () const
 
calculation_type get_cal_type () const
 

Private Attributes

const Parallel_2DpX
 
ModuleBase::matrix eig_ks_diff
 
const int & nk
 
const int & nocc
 
const int & nvirt
 
Device * ctx = {}
 

Additional Inherited Members

- Public Types inherited from hamilt::Operator< T, Device >
typedef std::tuple< const psi::Psi< T, Device > *, const psi::Range, T * > hpsi_info
 
- Public Attributes inherited from hamilt::Operator< T, Device >
Operatornext_op = nullptr
 interface type 3: return a Psi-type HPsi
 
- Protected Types inherited from hamilt::Operator< T, Device >
using set_memory_op = base_device::memory::set_memory_op< T, Device >
 
- Protected Member Functions inherited from hamilt::Operator< T, Device >
Tget_hpsi (const hpsi_info &info) const
 
- Protected Attributes inherited from hamilt::Operator< T, Device >
int ik = 0
 
int act_type = 1
 determine which act() interface would be called in hPsi()
 
bool in_place = false
 
enum calculation_type cal_type
 
Operatornext_sub_op = nullptr
 
bool is_first_node = true
 
psi::Psi< T, Device > * hpsi = nullptr
 
Device * ctx = {}
 

Detailed Description

template<typename T = double, typename Device = base_device::DEVICE_CPU>
class LR::OperatorLRDiag< T, Device >

Diag part of A operator: [AX]_iak = (e_ak - e_ik) X_iak.

Constructor & Destructor Documentation

◆ OperatorLRDiag()

template<typename T = double, typename Device = base_device::DEVICE_CPU>
LR::OperatorLRDiag< T, Device >::OperatorLRDiag ( const double *  eig_ks,
const Parallel_2D pX_in,
const int &  nk_in,
const int &  nocc_in,
const int &  nvirt_in 
)
inline
Here is the call graph for this function:

Member Function Documentation

◆ act()

template<typename T = double, typename Device = base_device::DEVICE_CPU>
virtual void LR::OperatorLRDiag< T, Device >::act ( const int  nbands,
const int  nbasis,
const int  npol,
const T psi_in,
T hpsi,
const int  ngk_ik = 0,
const bool  is_first_node = false 
) const
inlineoverridevirtual

caution: put this operator at the head of the operator list, because vector_mul_vector_op directly assign to (rather than add on) psi_out.

Reimplemented from hamilt::Operator< T, Device >.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init()

template<typename T = double, typename Device = base_device::DEVICE_CPU>
void LR::OperatorLRDiag< T, Device >::init ( const int  ik_in)
inlineoverridevirtual

Reimplemented from hamilt::Operator< T, Device >.

Member Data Documentation

◆ ctx

template<typename T = double, typename Device = base_device::DEVICE_CPU>
Device* LR::OperatorLRDiag< T, Device >::ctx = {}
private

◆ eig_ks_diff

template<typename T = double, typename Device = base_device::DEVICE_CPU>
ModuleBase::matrix LR::OperatorLRDiag< T, Device >::eig_ks_diff
private

◆ nk

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const int& LR::OperatorLRDiag< T, Device >::nk
private

◆ nocc

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const int& LR::OperatorLRDiag< T, Device >::nocc
private

◆ nvirt

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const int& LR::OperatorLRDiag< T, Device >::nvirt
private

◆ pX

template<typename T = double, typename Device = base_device::DEVICE_CPU>
const Parallel_2D& LR::OperatorLRDiag< T, Device >::pX
private

The documentation for this class was generated from the following file: