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

#include <hamilt_sdft_pw.h>

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

Public Types

using Real = typename GetTypeReal< T >::type
 

Public Member Functions

 HamiltSdftPW (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 HamiltSdftPW object.
 
 ~HamiltSdftPW ()
 Destroy the HamiltSdftPW 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, Device >
 HamiltPW (elecstate::Potential *pot_in, ModulePW::PW_Basis_K *wfc_basis, K_Vectors *p_kv, pseudopot_cell_vnl *nlpp, const UnitCell *ucell)
 
template<typename T_in , typename Device_in = Device>
 HamiltPW (const HamiltPW< T_in, Device_in > *hamilt)
 
 ~HamiltPW ()
 
void updateHk (const int ik) override
 for target K point, update consequence of hPsi() and matrix()
 
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, Device > &exx_helper_in)
 
void sPsi (const double *psi_in, double *spsi, const int nrow, const int npw, const int nbands) const
 
void sPsi (const std::complex< double > *psi_in, std::complex< double > *spsi, const int nrow, const int npw, const int nbands) const
 
void sPsi (const std::complex< float > *psi_in, std::complex< float > *spsi, const int nrow, const int npw, const int nbands) const
 
void updateHk (const int ik)
 for target K point, update consequence of hPsi() and matrix()
 
 HamiltPW (elecstate::Potential *pot_in, ModulePW::PW_Basis_K *wfc_basis, K_Vectors *pkv, pseudopot_cell_vnl *, const UnitCell *)
 
 ~HamiltPW ()
 
void updateHk (const int ik)
 for target K point, update consequence of hPsi() and matrix()
 
 HamiltPW (elecstate::Potential *pot_in, ModulePW::PW_Basis_K *wfc_basis, K_Vectors *pkv, pseudopot_cell_vnl *, const UnitCell *)
 
 ~HamiltPW ()
 
void updateHk (const int ik)
 for target K point, update consequence of hPsi() and matrix()
 
 HamiltPW (elecstate::Potential *pot_in, ModulePW::PW_Basis_K *wfc_basis, K_Vectors *pkv, pseudopot_cell_vnl *, const UnitCell *)
 
 ~HamiltPW ()
 
- Public Member Functions inherited from hamilt::Hamilt< T, Device >
virtual ~Hamilt ()
 
virtual void refresh (void)
 refresh status of Hamiltonian, for example, refresh H(R) and S(R) in LCAO case
 
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.
 
virtual void matrix (MatrixBlock< double > &hk_in, MatrixBlock< double > &sk_in)
 
virtual std::vector< Tmatrix ()
 

Public Attributes

Realemin = nullptr
 Emin of the Hamiltonian.
 
Realemax = nullptr
 Emax of the Hamiltonian.
 
- Public Attributes inherited from hamilt::Hamilt< T, Device >
std::string classname = "none"
 
int non_first_scf =0
 
Operator< T, Device > * ops = nullptr
 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, Device >
using gemv_op = ModuleBase::gemv_op< T, Device >
 
using gemm_op = ModuleBase::gemm_op< T, Device >
 
using setmem_complex_op = base_device::memory::set_memory_op< T, Device >
 
using resmem_complex_op = base_device::memory::resize_memory_op< T, Device >
 
using delmem_complex_op = base_device::memory::delete_memory_op< T, Device >
 
using syncmem_op = base_device::memory::synchronize_memory_op< T, Device, Device >
 
- Protected Types inherited from hamilt::Hamilt< T, Device >
using syncmem_op = base_device::memory::synchronize_memory_op< T, Device, Device >
 
- Protected Attributes inherited from hamilt::HamiltPW< T, Device >
const pseudopot_cell_vnlppcell = nullptr
 
const UnitCell *const ucell = nullptr
 
Tvkb = nullptr
 
Realqq_nt = nullptr
 
Tqq_so = nullptr
 
Device * ctx = {}
 
- Protected Attributes inherited from hamilt::Hamilt< T, Device >
Device * ctx = {}
 

Member Typedef Documentation

◆ Real

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

Constructor & Destructor Documentation

◆ HamiltSdftPW()

template<typename T , typename Device >
hamilt::HamiltSdftPW< T, Device >::HamiltSdftPW ( 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 HamiltSdftPW 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

◆ ~HamiltSdftPW()

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

Destroy the HamiltSdftPW object.

Member Function Documentation

◆ hPsi()

template<typename T , typename Device >
void hamilt::HamiltSdftPW< 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:

◆ hPsi_norm()

template<typename T , typename Device >
void hamilt::HamiltSdftPW< 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:

Member Data Documentation

◆ emax

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

Emax of the Hamiltonian.

◆ emin

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

Emin of the Hamiltonian.

◆ ngk

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

number of G vectors

◆ npol

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

number of polarizations

◆ npwk_max

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

maximum number of plane waves


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