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

Accumulate explicitly weighted collinear USPP states with reusable device buffers. More...

#include <uspp_density.h>

Collaboration diagram for elecstate::UsppProjector< T, Device >:

Classes

class  Workspace

Public Member Functions

 UsppProjector (const UnitCell &ucell, const pseudopot_cell_vnl &ppcell, const int nbands)
 Bind cell/projectors and allocate storage for a block of nbands states.
 ~UsppProjector ()
void accumulate (const int ik, const T *coefficients, const int stride, const int npw, const int spin, const std::vector< double > &weights, std::vector< double > *becsum)
 Add weighted projector products to the caller's packed coefficients.

Private Attributes

const UnitCell & ucell_
const pseudopot_cell_vnl & ppcell_
const int nbands_
std::unique_ptr< Workspace > work_

Detailed Description

template<typename T, typename Device>
class elecstate::UsppProjector< T, Device >

Accumulate explicitly weighted collinear USPP states with reusable device buffers.

Constructor & Destructor Documentation

◆ UsppProjector()

template<typename T, typename Device>
elecstate::UsppProjector< T, Device >::UsppProjector ( const UnitCell & ucell,
const pseudopot_cell_vnl & ppcell,
const int nbands )

Bind cell/projectors and allocate storage for a block of nbands states.

◆ ~UsppProjector()

template<typename T, typename Device>
elecstate::UsppProjector< T, Device >::~UsppProjector ( )
default

Member Function Documentation

◆ accumulate()

template<typename T, typename Device>
void elecstate::UsppProjector< T, Device >::accumulate ( const int ik,
const T * coefficients,
const int stride,
const int npw,
const int spin,
const std::vector< double > & weights,
std::vector< double > * becsum )

Add weighted projector products to the caller's packed coefficients.

Parameters
coefficientsDevice-resident PW coefficients, accessed with the supplied stride.
strideStorage leading dimension between successive states.
npwNumber of active plane waves on this pool rank.
spinScalar/collinear density channel receiving the contribution.
weightsOne explicit weight for each state in the block.
becsumHost output; existing contributions are retained. All ranks in the owning POOL_WORLD must participate in the overlap reduction. The current contract has no spinor component layout or cross-spin products. Supporting nspin=4 requires extending this interface and constructing charge/magnetization projector weights.
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ nbands_

template<typename T, typename Device>
const int elecstate::UsppProjector< T, Device >::nbands_
private

◆ ppcell_

template<typename T, typename Device>
const pseudopot_cell_vnl& elecstate::UsppProjector< T, Device >::ppcell_
private

◆ ucell_

template<typename T, typename Device>
const UnitCell& elecstate::UsppProjector< T, Device >::ucell_
private

◆ work_

template<typename T, typename Device>
std::unique_ptr<Workspace> elecstate::UsppProjector< T, Device >::work_
private

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