ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions | Private Attributes | List of all members
hamilt::OperatorLCAO< TK, TR > Class Template Reference

#include <operator_lcao.h>

Inheritance diagram for hamilt::OperatorLCAO< TK, TR >:
Collaboration diagram for hamilt::OperatorLCAO< TK, TR >:

Public Member Functions

 OperatorLCAO (HS_Matrix_K< TK > *hsk_in, const std::vector< ModuleBase::Vector3< double > > &kvec_d_in, HContainer< TR > *hR_in)
 H(R) matrix, R is the Bravis lattice vector.
 
virtual ~OperatorLCAO ()
 
virtual void init (const int ik_in) override
 
void refresh_h ()
 
virtual void contributeHR ()
 
void matrixHk (MatrixBlock< TK > &hk_in, MatrixBlock< TK > &sk_in)
 
virtual void contributeHk (int ik)
 
virtual void set_HR_fixed (void *)
 set_HR_fixed() is used for pass HR_fixed matrix to the next node in sub-chain table not used in base class, only be override in fixed Hamiltonian Operators (e.g. Ekinetic and Nonlocal)
 
void set_hr_done (bool hr_done_in)
 reset the status of 'hr_done' (if H(R) is calculated)
 
void set_current_spin (const int current_spin_in)
 set current spin index
 
void contributeHk (int ik)
 
- Public Member Functions inherited from hamilt::Operator< TK >
 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 int nbands, const int nbasis, const int npol, const TK *tmpsi_in, TK *tmhpsi, const int ngk_ik=0, const bool is_first_node=false) const
 
virtual void act (const psi::Psi< TK, base_device::DEVICE_CPU > &psi_in, psi::Psi< TK, base_device::DEVICE_CPU > &psi_out, const int nbands) const
 
int get_act_type () const
 
calculation_type get_cal_type () const
 

Public Attributes

HS_Matrix_K< TK > * hsk = nullptr
 
const std::vector< ModuleBase::Vector3< double > > & kvec_d
 
- Public Attributes inherited from hamilt::Operator< TK >
Operatornext_op
 interface type 3: return a Psi-type HPsi
 

Protected Attributes

bool new_e_iteration = true
 
hamilt::HContainer< TR > * hR = nullptr
 Real-space Hamiltonian pointer.
 
int current_spin = 0
 current spin index
 
bool hr_done = false
 if H(R) is calculated
 
- Protected Attributes inherited from hamilt::Operator< TK >
int ik
 
int act_type
 determine which act() interface would be called in hPsi()
 
bool in_place
 
enum calculation_type cal_type
 
Operatornext_sub_op
 
bool is_first_node
 
psi::Psi< TK, base_device::DEVICE_CPU > * hpsi
 
base_device::DEVICE_CPU * ctx
 

Private Member Functions

void get_hs_pointers ()
 
void get_hs_pointers ()
 
void get_hs_pointers ()
 
void get_hs_pointers ()
 

Private Attributes

TK * hmatrix_k = nullptr
 
TK * smatrix_k = nullptr
 
bool allocated_smatrix = false
 only used for Gamma_only case
 

Additional Inherited Members

- Public Types inherited from hamilt::Operator< TK >
typedef std::tuple< const psi::Psi< TK, base_device::DEVICE_CPU > *, const psi::Range, TK * > hpsi_info
 
- Protected Types inherited from hamilt::Operator< TK >
using set_memory_op = base_device::memory::set_memory_op< TK, base_device::DEVICE_CPU >
 
- Protected Member Functions inherited from hamilt::Operator< TK >
TK * get_hpsi (const hpsi_info &info) const
 

Constructor & Destructor Documentation

◆ OperatorLCAO()

template<typename TK , typename TR >
hamilt::OperatorLCAO< TK, TR >::OperatorLCAO ( HS_Matrix_K< TK > *  hsk_in,
const std::vector< ModuleBase::Vector3< double > > &  kvec_d_in,
HContainer< TR > *  hR_in 
)
inline

H(R) matrix, R is the Bravis lattice vector.

Parameters
hR_ink-point vectors

◆ ~OperatorLCAO()

template<typename TK , typename TR >
virtual hamilt::OperatorLCAO< TK, TR >::~OperatorLCAO ( )
inlinevirtual

Member Function Documentation

◆ contributeHk() [1/2]

void hamilt::OperatorLCAO< double, double >::contributeHk ( int  ik)
Here is the call graph for this function:

◆ contributeHk() [2/2]

template<typename TK , typename TR >
void hamilt::OperatorLCAO< TK, TR >::contributeHk ( int  ik)
virtual

◆ contributeHR()

template<typename TK , typename TR >
virtual void hamilt::OperatorLCAO< TK, TR >::contributeHR ( )
inlinevirtual

◆ get_hs_pointers() [1/4]

void hamilt::OperatorLCAO< double, double >::get_hs_pointers ( )
private
Here is the call graph for this function:

◆ get_hs_pointers() [2/4]

void hamilt::OperatorLCAO< std::complex< double >, double >::get_hs_pointers ( )
private

◆ get_hs_pointers() [3/4]

void hamilt::OperatorLCAO< std::complex< double >, std::complex< double > >::get_hs_pointers ( )
private

◆ get_hs_pointers() [4/4]

template<typename TK , typename TR >
void hamilt::OperatorLCAO< TK, TR >::get_hs_pointers ( )
private
Here is the caller graph for this function:

◆ init()

template<typename TK , typename TR >
void hamilt::OperatorLCAO< TK, TR >::init ( const int  ik_in)
overridevirtual

Reimplemented from hamilt::Operator< TK >.

Here is the call graph for this function:

◆ matrixHk()

template<typename TK , typename TR >
void hamilt::OperatorLCAO< TK, TR >::matrixHk ( MatrixBlock< TK > &  hk_in,
MatrixBlock< TK > &  sk_in 
)
inline
Here is the call graph for this function:

◆ refresh_h()

template<typename TK , typename TR >
void hamilt::OperatorLCAO< TK, TR >::refresh_h ( )

◆ set_current_spin()

template<typename TK , typename TR >
void hamilt::OperatorLCAO< TK, TR >::set_current_spin ( const int  current_spin_in)

set current spin index

◆ set_hr_done()

template<typename TK , typename TR >
void hamilt::OperatorLCAO< TK, TR >::set_hr_done ( bool  hr_done_in)

reset the status of 'hr_done' (if H(R) is calculated)

◆ set_HR_fixed()

template<typename TK , typename TR >
virtual void hamilt::OperatorLCAO< TK, TR >::set_HR_fixed ( void *  )
inlinevirtual

set_HR_fixed() is used for pass HR_fixed matrix to the next node in sub-chain table not used in base class, only be override in fixed Hamiltonian Operators (e.g. Ekinetic and Nonlocal)

Reimplemented in hamilt::EkineticNew< OperatorLCAO< TK, TR > >, hamilt::NonlocalNew< OperatorLCAO< TK, TR > >, hamilt::TDEkinetic< OperatorLCAO< TK, TR > >, hamilt::TDNonlocal< OperatorLCAO< TK, TR > >, and hamilt::TD_pot_hybrid< OperatorLCAO< TK, TR > >.

Member Data Documentation

◆ allocated_smatrix

template<typename TK , typename TR >
bool hamilt::OperatorLCAO< TK, TR >::allocated_smatrix = false
private

only used for Gamma_only case

◆ current_spin

template<typename TK , typename TR >
int hamilt::OperatorLCAO< TK, TR >::current_spin = 0
protected

current spin index

◆ hmatrix_k

template<typename TK , typename TR >
TK* hamilt::OperatorLCAO< TK, TR >::hmatrix_k = nullptr
private

there are H and S matrix for each k point in reciprocal space 'double' type for gamma_only case, 'complex<double>' type for multi k-points case

◆ hR

template<typename TK , typename TR >
hamilt::HContainer<TR>* hamilt::OperatorLCAO< TK, TR >::hR = nullptr
protected

Real-space Hamiltonian pointer.

◆ hr_done

template<typename TK , typename TR >
bool hamilt::OperatorLCAO< TK, TR >::hr_done = false
protected

if H(R) is calculated

◆ hsk

template<typename TK , typename TR >
HS_Matrix_K<TK>* hamilt::OperatorLCAO< TK, TR >::hsk = nullptr

◆ kvec_d

template<typename TK , typename TR >
const std::vector<ModuleBase::Vector3<double> >& hamilt::OperatorLCAO< TK, TR >::kvec_d

◆ new_e_iteration

template<typename TK , typename TR >
bool hamilt::OperatorLCAO< TK, TR >::new_e_iteration = true
protected

◆ smatrix_k

template<typename TK , typename TR >
TK* hamilt::OperatorLCAO< TK, TR >::smatrix_k = nullptr
private

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