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

#include <hamilt.h>

Inheritance diagram for hamilt::Hamilt< T, Device >:
Collaboration diagram for hamilt::Hamilt< T, Device >:

Public Member Functions

virtual ~Hamilt ()
 
void updateHk (const int ik) override
 for target K point, update consequence of hPsi() and matrix()
 
void refresh (bool yes=true) override
 refresh status of Hamiltonian, for example, refresh H(R) and S(R) in LCAO case
 
std::string get_classname () const override
 get the class name
 
void * get_ops () override
 get the operator chain
 
virtual void hPsi (const T *psi_in, T *hpsi, const size_t size) const
 core function: for solving eigenvalues of Hamiltonian with iterative method
 
virtual void sPsi (const T *psi_in, T *spsi, const int nrow, const int npw, const int nbands) const
 
virtual void matrix (MatrixBlock< std::complex< double > > &hk_in, MatrixBlock< std::complex< double > > &sk_in)
 core function: return H(k) and S(k) matrixs for direct solving eigenvalues.
 
virtual void matrix (MatrixBlock< double > &hk_in, MatrixBlock< double > &sk_in)
 
virtual std::vector< Tmatrix ()
 
- Public Member Functions inherited from hamilt::HamiltBase
virtual ~HamiltBase ()
 

Public Attributes

std::string classname = "none"
 
Operator< T, Device > * ops = nullptr
 first node operator, add operations from each operators
 

Protected Types

using syncmem_op = base_device::memory::synchronize_memory_op< T, Device, Device >
 

Protected Attributes

Device * ctx = {}
 

Member Typedef Documentation

◆ syncmem_op

template<typename T , typename Device = base_device::DEVICE_CPU>
using hamilt::Hamilt< T, Device >::syncmem_op = base_device::memory::synchronize_memory_op<T, Device, Device>
protected

Constructor & Destructor Documentation

◆ ~Hamilt()

template<typename T , typename Device = base_device::DEVICE_CPU>
virtual hamilt::Hamilt< T, Device >::~Hamilt ( )
inlinevirtual

Member Function Documentation

◆ get_classname()

template<typename T , typename Device = base_device::DEVICE_CPU>
std::string hamilt::Hamilt< T, Device >::get_classname ( ) const
inlineoverridevirtual

get the class name

Reimplemented from hamilt::HamiltBase.

◆ get_ops()

template<typename T , typename Device = base_device::DEVICE_CPU>
void * hamilt::Hamilt< T, Device >::get_ops ( )
inlineoverridevirtual

get the operator chain

Reimplemented from hamilt::HamiltBase.

◆ hPsi()

template<typename T , typename Device = base_device::DEVICE_CPU>
virtual void hamilt::Hamilt< T, Device >::hPsi ( const T psi_in,
T hpsi,
const size_t  size 
) const
inlinevirtual

core function: for solving eigenvalues of Hamiltonian with iterative method

◆ matrix() [1/3]

template<typename T , typename Device = base_device::DEVICE_CPU>
virtual std::vector< T > hamilt::Hamilt< T, Device >::matrix ( )
inlinevirtual

◆ matrix() [2/3]

template<typename T , typename Device = base_device::DEVICE_CPU>
virtual void hamilt::Hamilt< T, Device >::matrix ( MatrixBlock< double > &  hk_in,
MatrixBlock< double > &  sk_in 
)
inlinevirtual

◆ matrix() [3/3]

template<typename T , typename Device = base_device::DEVICE_CPU>
virtual void hamilt::Hamilt< T, Device >::matrix ( MatrixBlock< std::complex< double > > &  hk_in,
MatrixBlock< std::complex< double > > &  sk_in 
)
inlinevirtual

core function: return H(k) and S(k) matrixs for direct solving eigenvalues.

Here is the caller graph for this function:

◆ refresh()

template<typename T , typename Device = base_device::DEVICE_CPU>
void hamilt::Hamilt< T, Device >::refresh ( bool  yes = true)
inlineoverridevirtual

refresh status of Hamiltonian, for example, refresh H(R) and S(R) in LCAO case

Reimplemented from hamilt::HamiltBase.

Reimplemented in hamilt::HamiltLCAO< TK, TR >.

Here is the caller graph for this function:

◆ sPsi()

template<typename T , typename Device = base_device::DEVICE_CPU>
virtual void hamilt::Hamilt< T, Device >::sPsi ( const T psi_in,
T spsi,
const int  nrow,
const int  npw,
const int  nbands 
) const
inlinevirtual

Reimplemented in hamilt::HamiltPW< std::complex< double >, base_device::DEVICE_CPU >, hamilt::HamiltPW< std::complex< FPTYPE >, Device >, hamilt::HamiltPW< std::complex< lowTYPE >, Device >, hamilt::HamiltPW< T, Device >, and hamilt::HamiltPW< T, base_device::DEVICE_CPU >.

Here is the caller graph for this function:

◆ updateHk()

template<typename T , typename Device = base_device::DEVICE_CPU>
void hamilt::Hamilt< T, Device >::updateHk ( const int  ik)
inlineoverridevirtual

Member Data Documentation

◆ classname

template<typename T , typename Device = base_device::DEVICE_CPU>
std::string hamilt::Hamilt< T, Device >::classname = "none"

◆ ctx

template<typename T , typename Device = base_device::DEVICE_CPU>
Device* hamilt::Hamilt< T, Device >::ctx = {}
protected

◆ ops

template<typename T , typename Device = base_device::DEVICE_CPU>
Operator<T, Device>* hamilt::Hamilt< T, Device >::ops = nullptr

first node operator, add operations from each operators


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