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

Reusable device buffers for applying a nonlocal projector operator. More...

#include <nonlocal_workspace.h>

Collaboration diagram for hamilt::NonlocalWorkspace< T, Device >:

Public Member Functions

 NonlocalWorkspace ()=default
 ~NonlocalWorkspace ()
 NonlocalWorkspace (const NonlocalWorkspace &)=delete
NonlocalWorkspace & operator= (const NonlocalWorkspace &)=delete
void apply (const UnitCell &cell, const pseudopot_cell_vnl &pp, const ModulePW::PW_Basis_K &basis, const int spin, const int bands, const int nbasis, const int npol, const int npw, const bool is_first_node, const T *vkb, const T *psi, T *hpsi)
 Apply beta D beta-dagger, preserving pool collectives on empty ranks.
T * get_becp () const
 Borrow the most recently computed projection coefficients.
void project_contract (const UnitCell &cell, const pseudopot_cell_vnl &pp, const ModulePW::PW_Basis_K &basis, int spin, int bands, int nbasis, int npol, int npw, const T *vkb, const T *psi)
 Project and contract on every pool rank, including empty PW partitions; bands counts spin-component columns. B uses [column][projector] and DB [projector][column]; both borrowed arrays are pool-reduced and valid until the next operation.
const T * projections () const
const T * contracted () const

Private Member Functions

void project (const T *vkb, const T *psi, const int npw, const int ldv, const int ldp, const int nkb, const int bands)
void contract (const UnitCell &cell, const pseudopot_cell_vnl &pp, const int spin, const int npol, const int bands)
void back_project (const T *vkb, T *hpsi, const int npw, const int ldv, const int ldp, const int nkb, const int bands)

Private Attributes

T * becp_ = nullptr
T * ps_ = nullptr
size_t becp_capacity_ = 0
size_t ps_capacity_ = 0

Detailed Description

template<typename T, typename Device>
class hamilt::NonlocalWorkspace< T, Device >

Reusable device buffers for applying a nonlocal projector operator.

Constructor & Destructor Documentation

◆ NonlocalWorkspace() [1/2]

template<typename T, typename Device>
hamilt::NonlocalWorkspace< T, Device >::NonlocalWorkspace ( )
default
Here is the caller graph for this function:

◆ ~NonlocalWorkspace()

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

◆ NonlocalWorkspace() [2/2]

template<typename T, typename Device>
hamilt::NonlocalWorkspace< T, Device >::NonlocalWorkspace ( const NonlocalWorkspace< T, Device > & )
delete
Here is the call graph for this function:

Member Function Documentation

◆ apply()

template<typename T, typename Device>
void hamilt::NonlocalWorkspace< T, Device >::apply ( const UnitCell & cell,
const pseudopot_cell_vnl & pp,
const ModulePW::PW_Basis_K & basis,
const int spin,
const int bands,
const int nbasis,
const int npol,
const int npw,
const bool is_first_node,
const T * vkb,
const T * psi,
T * hpsi )

Apply beta D beta-dagger, preserving pool collectives on empty ranks.

Here is the call graph for this function:

◆ back_project()

template<typename T, typename Device>
void hamilt::NonlocalWorkspace< T, Device >::back_project ( const T * vkb,
T * hpsi,
const int npw,
const int ldv,
const int ldp,
const int nkb,
const int bands )
private
Here is the caller graph for this function:

◆ contract()

template<typename T, typename Device>
void hamilt::NonlocalWorkspace< T, Device >::contract ( const UnitCell & cell,
const pseudopot_cell_vnl & pp,
const int spin,
const int npol,
const int bands )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ contracted()

template<typename T, typename Device>
const T * hamilt::NonlocalWorkspace< T, Device >::contracted ( ) const
inline

◆ get_becp()

template<typename T, typename Device>
T * hamilt::NonlocalWorkspace< T, Device >::get_becp ( ) const
inline

Borrow the most recently computed projection coefficients.

◆ operator=()

template<typename T, typename Device>
NonlocalWorkspace & hamilt::NonlocalWorkspace< T, Device >::operator= ( const NonlocalWorkspace< T, Device > & )
delete
Here is the call graph for this function:

◆ project()

template<typename T, typename Device>
void hamilt::NonlocalWorkspace< T, Device >::project ( const T * vkb,
const T * psi,
const int npw,
const int ldv,
const int ldp,
const int nkb,
const int bands )
private
Here is the caller graph for this function:

◆ project_contract()

template<typename T, typename Device>
void hamilt::NonlocalWorkspace< T, Device >::project_contract ( const UnitCell & cell,
const pseudopot_cell_vnl & pp,
const ModulePW::PW_Basis_K & basis,
int spin,
int bands,
int nbasis,
int npol,
int npw,
const T * vkb,
const T * psi )

Project and contract on every pool rank, including empty PW partitions; bands counts spin-component columns. B uses [column][projector] and DB [projector][column]; both borrowed arrays are pool-reduced and valid until the next operation.

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

◆ projections()

template<typename T, typename Device>
const T * hamilt::NonlocalWorkspace< T, Device >::projections ( ) const
inline

Member Data Documentation

◆ becp_

template<typename T, typename Device>
T* hamilt::NonlocalWorkspace< T, Device >::becp_ = nullptr
private

◆ becp_capacity_

template<typename T, typename Device>
size_t hamilt::NonlocalWorkspace< T, Device >::becp_capacity_ = 0
private

◆ ps_

template<typename T, typename Device>
T* hamilt::NonlocalWorkspace< T, Device >::ps_ = nullptr
private

◆ ps_capacity_

template<typename T, typename Device>
size_t hamilt::NonlocalWorkspace< T, Device >::ps_capacity_ = 0
private

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