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

#include <hamilt_pw.h>

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

Public Member Functions

 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, Device > &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 ()

Protected Types

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, base_device::DEVICE_CPU >
using syncmem_op

Protected Attributes

const pseudopot_cell_vnl * ppcell = nullptr
const UnitCell *const ucell = nullptr
T * vkb = nullptr
Real * qq_nt = nullptr
T * qq_so = nullptr
Device * ctx = {}
Protected Attributes inherited from hamilt::Hamilt< T, base_device::DEVICE_CPU >
base_device::DEVICE_CPU * ctx

Private Types

using Real = typename GetTypeReal<T>::type
using syncmem_complex_h2d_op = base_device::memory::synchronize_memory_op<T, Device, base_device::DEVICE_CPU>

Additional Inherited Members

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

Member Typedef Documentation

◆ delmem_complex_op

template<typename T, typename Device = base_device::DEVICE_CPU>
using hamilt::HamiltPW< T, Device >::delmem_complex_op = base_device::memory::delete_memory_op<T, Device>
protected

◆ gemm_op

template<typename T, typename Device = base_device::DEVICE_CPU>
using hamilt::HamiltPW< T, Device >::gemm_op = ModuleBase::gemm_op<T, Device>
protected

◆ gemv_op

template<typename T, typename Device = base_device::DEVICE_CPU>
using hamilt::HamiltPW< T, Device >::gemv_op = ModuleBase::gemv_op<T, Device>
protected

◆ Real

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

◆ resmem_complex_op

template<typename T, typename Device = base_device::DEVICE_CPU>
using hamilt::HamiltPW< T, Device >::resmem_complex_op = base_device::memory::resize_memory_op<T, Device>
protected

◆ setmem_complex_op

template<typename T, typename Device = base_device::DEVICE_CPU>
using hamilt::HamiltPW< T, Device >::setmem_complex_op = base_device::memory::set_memory_op<T, Device>
protected

◆ syncmem_complex_h2d_op

template<typename T, typename Device = base_device::DEVICE_CPU>
using hamilt::HamiltPW< T, Device >::syncmem_complex_h2d_op = base_device::memory::synchronize_memory_op<T, Device, base_device::DEVICE_CPU>
private

◆ syncmem_op

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

Constructor & Destructor Documentation

◆ HamiltPW()

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

template<typename T, typename Device>
hamilt::HamiltPW< T, Device >::~HamiltPW ( )

Member Function Documentation

◆ bind_td_state()

template<typename T, typename Device>
void hamilt::HamiltPW< T, Device >::bind_td_state ( const Real * veff,
const ModuleBase::Vector3< double > & A_ha )

Bind local-potential buffers and Hartree vector potential for the same operation.

Note
The caller must keep the buffers alive and restore endpoint state after propagation.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_exx_helper()

template<typename T, typename Device>
void hamilt::HamiltPW< T, Device >::set_exx_helper ( Exx_Helper< T, Device > & exx_helper_in)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sPsi()

template<typename T, typename Device>
void hamilt::HamiltPW< T, Device >::sPsi ( const T * psi_in,
T * spsi,
const int nrow,
const int npw,
const int nbands ) const
overridevirtual

Reimplemented from hamilt::Hamilt< T, base_device::DEVICE_CPU >.

Here is the call graph for this function:

◆ updateHk()

template<typename T, typename Device>
void hamilt::HamiltPW< T, Device >::updateHk ( const int ik)
overridevirtual

for target K point, update consequence of hPsi() and matrix()

Reimplemented from hamilt::Hamilt< T, base_device::DEVICE_CPU >.

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

Member Data Documentation

◆ ctx

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

◆ ppcell

template<typename T, typename Device = base_device::DEVICE_CPU>
const pseudopot_cell_vnl* hamilt::HamiltPW< T, Device >::ppcell = nullptr
protected

◆ qq_nt

template<typename T, typename Device = base_device::DEVICE_CPU>
Real* hamilt::HamiltPW< T, Device >::qq_nt = nullptr
protected

◆ qq_so

template<typename T, typename Device = base_device::DEVICE_CPU>
T* hamilt::HamiltPW< T, Device >::qq_so = nullptr
protected

◆ ucell

template<typename T, typename Device = base_device::DEVICE_CPU>
const UnitCell* const hamilt::HamiltPW< T, Device >::ucell = nullptr
protected

◆ vkb

template<typename T, typename Device = base_device::DEVICE_CPU>
T* hamilt::HamiltPW< T, Device >::vkb = nullptr
mutableprotected

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