ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
StoHamiltPW< T, Device > Class Template Reference

#include <sto_hamilt_pw.h>

Inheritance diagram for StoHamiltPW< T, Device >:
Collaboration diagram for StoHamiltPW< T, Device >:

Public Types

using Real = typename GetTypeReal<T>::type

Public Member Functions

 StoHamiltPW (elecstate::Potential *pot_in, ModulePW::PW_Basis_K *wfc_basis, K_Vectors *p_kv, pseudopot_cell_vnl *nlpp, const UnitCell *ucell, const int &npol, Real *emin_in, Real *emax_in)
 Construct a new StoHamiltPW object.
 ~StoHamiltPW ()
 Destroy the StoHamiltPW object.
void hPsi (const T *psi_in, T *hpsi, const int &nbands=1)
 Calculate \hat{H}|psi>.
void hPsi_norm (const T *psi_in, T *hpsi, const int &nbands=1)
 Calculate \hat{H}|psi> and normalize it.
Public Member Functions inherited from hamilt::HamiltPW< T, base_device::DEVICE_CPU >
 HamiltPW (elecstate::Potential *pot_in, ModulePW::PW_Basis_K *wfc_basis, K_Vectors *p_kv, pseudopot_cell_vnl *nlpp, Plus_U_Base *p_dftu, const UnitCell *ucell, const General_Exx_Info *exx_info)
 ~HamiltPW ()
void updateHk (const int ik) override
 for target K point, update consequence of hPsi() and matrix()
void bind_td_state (const Real *veff, const ModuleBase::Vector3< double > &A_ha)
 Bind local-potential buffers and Hartree vector potential for the same operation.
void sPsi (const T *psi_in, T *spsi, const int nrow, const int npw, const int nbands) const override
void set_exx_helper (Exx_Helper< T, base_device::DEVICE_CPU > &exx_helper_in)
Public Member Functions inherited from hamilt::Hamilt< T, base_device::DEVICE_CPU >
virtual ~Hamilt ()
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 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.
Public Member Functions inherited from hamilt::HamiltBase
virtual ~HamiltBase ()

Public Attributes

Real * emin = nullptr
 Emin of the Hamiltonian.
Real * emax = nullptr
 Emax of the Hamiltonian.
Public Attributes inherited from hamilt::Hamilt< T, base_device::DEVICE_CPU >
std::string classname
Operator< T, base_device::DEVICE_CPU > * ops
 first node operator, add operations from each operators

Private Attributes

int npwk_max = 0
 maximum number of plane waves
int npol = 0
 number of polarizations
std::vector< int > & ngk
 number of G vectors

Additional Inherited Members

Protected Types inherited from hamilt::HamiltPW< T, base_device::DEVICE_CPU >
using gemv_op
using gemm_op
using setmem_complex_op
using resmem_complex_op
using delmem_complex_op
using syncmem_op
Protected Types inherited from hamilt::Hamilt< T, base_device::DEVICE_CPU >
using syncmem_op
Protected Attributes inherited from hamilt::HamiltPW< T, base_device::DEVICE_CPU >
const pseudopot_cell_vnl * ppcell
const UnitCell *const ucell
T * vkb
Real * qq_nt
T * qq_so
base_device::DEVICE_CPU * ctx
Protected Attributes inherited from hamilt::Hamilt< T, base_device::DEVICE_CPU >
base_device::DEVICE_CPU * ctx

Member Typedef Documentation

◆ Real

template<typename T, typename Device = base_device::DEVICE_CPU>
using StoHamiltPW< T, Device >::Real = typename GetTypeReal<T>::type

Constructor & Destructor Documentation

◆ StoHamiltPW()

template<typename T, typename Device>
StoHamiltPW< T, Device >::StoHamiltPW ( elecstate::Potential * pot_in,
ModulePW::PW_Basis_K * wfc_basis,
K_Vectors * p_kv,
pseudopot_cell_vnl * nlpp,
const UnitCell * ucell,
const int & npol,
Real * emin_in,
Real * emax_in )

Construct a new StoHamiltPW object.

Parameters
pot_inpotential
wfc_basispw basis for wave functions
p_kvk vectors
npolthe length of wave function is npol * npwk_max
emin_inEmin of the Hamiltonian
emax_inEmax of the Hamiltonian
Here is the call graph for this function:

◆ ~StoHamiltPW()

template<typename T, typename Device = base_device::DEVICE_CPU>
StoHamiltPW< T, Device >::~StoHamiltPW ( )
inline

Destroy the StoHamiltPW object.

Member Function Documentation

◆ hPsi()

template<typename T, typename Device>
void StoHamiltPW< T, Device >::hPsi ( const T * psi_in,
T * hpsi,
const int & nbands = 1 )

Calculate \hat{H}|psi>.

Parameters
psi_ininput wave function
hpsioutput wave function
nbandsnumber of bands
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hPsi_norm()

template<typename T, typename Device>
void StoHamiltPW< T, Device >::hPsi_norm ( const T * psi_in,
T * hpsi,
const int & nbands = 1 )

Calculate \hat{H}|psi> and normalize it.

Parameters
psi_ininput wave function
hpsioutput wave function
nbandsnumber of bands
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ emax

template<typename T, typename Device = base_device::DEVICE_CPU>
Real* StoHamiltPW< T, Device >::emax = nullptr

Emax of the Hamiltonian.

◆ emin

template<typename T, typename Device = base_device::DEVICE_CPU>
Real* StoHamiltPW< T, Device >::emin = nullptr

Emin of the Hamiltonian.

◆ ngk

template<typename T, typename Device = base_device::DEVICE_CPU>
std::vector<int>& StoHamiltPW< T, Device >::ngk
private

number of G vectors

◆ npol

template<typename T, typename Device = base_device::DEVICE_CPU>
int StoHamiltPW< T, Device >::npol = 0
private

number of polarizations

◆ npwk_max

template<typename T, typename Device = base_device::DEVICE_CPU>
int StoHamiltPW< T, Device >::npwk_max = 0
private

maximum number of plane waves


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