ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
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 ()
void bind_td_info (TD_info *info)
 Bind the solver-owned RT state once, after constructing the operator chain.
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)
virtual 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
 Core hot-path: compute H|psi> by traversing the operator chain.
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
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 >
Operator * next_op
 interface type 3: return a Psi-type HPsi

Protected Attributes

TD_info * td_info_ = nullptr
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
Operator * next_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
 input type of hPsi: (psi_input, range, hpsi_pointer)
Protected Types inherited from hamilt::Operator< TK >
using set_memory_op
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
Here is the caller graph for this function:

◆ ~OperatorLCAO()

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

Member Function Documentation

◆ bind_td_info()

template<typename TK, typename TR>
void hamilt::OperatorLCAO< TK, TR >::bind_td_info ( TD_info * info)

Bind the solver-owned RT state once, after constructing the operator chain.

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

◆ contributeHk() [1/2]

void hamilt::OperatorLCAO< double, double >::contributeHk ( int ik)

◆ contributeHk() [2/2]

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

Reimplemented in hamilt::DeePKS< OperatorLCAO< TK, TR > >, hamilt::DFTU_firstzeta< OperatorLCAO< TK, TR > >, hamilt::Meta< OperatorLCAO< TK, TR > >, hamilt::Overlap< OperatorLCAO< TK, TR > >, hamilt::Overlap< OperatorLCAO< TK, TR > >, hamilt::TD_pot_hybrid< OperatorLCAO< TK, TR > >, hamilt::TDEkinetic< OperatorLCAO< TK, TR > >, and hamilt::TDNonlocal< OperatorLCAO< TK, TR > >.

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

◆ contributeHR()

◆ get_hs_pointers() [1/4]

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

◆ get_hs_pointers() [2/4]

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

◆ get_hs_pointers() [3/4]

void hamilt::OperatorLCAO< double, 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:
Here is the caller graph for this function:

◆ refresh_h()

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

◆ set_current_spin()

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

set current spin index

Reimplemented in hamilt::DeltaSpin< OperatorLCAO< TK, TR > >.

Here is the caller graph for this function:

◆ 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::EKinetic< OperatorLCAO< TK, TR > >, hamilt::Nonlocal< OperatorLCAO< TK, TR > >, hamilt::TD_pot_hybrid< OperatorLCAO< TK, TR > >, hamilt::TDEkinetic< OperatorLCAO< TK, TR > >, and hamilt::TDNonlocal< 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

◆ td_info_

template<typename TK, typename TR>
TD_info* hamilt::OperatorLCAO< TK, TR >::td_info_ = nullptr
protected

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