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

Reusable projection storage and device contraction for a velocity operator. More...

#include <velocity_workspace.h>

Collaboration diagram for hamilt::VelocityWorkspace< Real, Device >:

Public Member Functions

Complex * prepare (const std::int64_t count)
 Reserve four input and four output projector blocks.
void contract (const UnitCell &cell, const pseudopot_cell_vnl &pp, const int spin, const int bands, const int npol, const Real scale, const ModulePW::PW_Basis_K &basis, Complex *buffer)
 Reduce four projection blocks and contract D on their native device; bands counts spin-component columns.

Private Types

using Complex = std::complex<Real>

Private Attributes

ct::Tensor coefficients_
std::vector< Complex > host_
std::int64_t capacity_ = 0

Detailed Description

template<typename Real, typename Device>
class hamilt::VelocityWorkspace< Real, Device >

Reusable projection storage and device contraction for a velocity operator.

Member Typedef Documentation

◆ Complex

template<typename Real, typename Device>
using hamilt::VelocityWorkspace< Real, Device >::Complex = std::complex<Real>
private

Member Function Documentation

◆ contract()

template<typename Real, typename Device>
void hamilt::VelocityWorkspace< Real, Device >::contract ( const UnitCell & cell,
const pseudopot_cell_vnl & pp,
const int spin,
const int bands,
const int npol,
const Real scale,
const ModulePW::PW_Basis_K & basis,
Complex * buffer )

Reduce four projection blocks and contract D on their native device; bands counts spin-component columns.

Here is the call graph for this function:

◆ prepare()

template<typename Real, typename Device>
std::complex< Real > * hamilt::VelocityWorkspace< Real, Device >::prepare ( const std::int64_t count)

Reserve four input and four output projector blocks.

Member Data Documentation

◆ capacity_

template<typename Real, typename Device>
std::int64_t hamilt::VelocityWorkspace< Real, Device >::capacity_ = 0
private

◆ coefficients_

template<typename Real, typename Device>
ct::Tensor hamilt::VelocityWorkspace< Real, Device >::coefficients_
private

◆ host_

template<typename Real, typename Device>
std::vector<Complex> hamilt::VelocityWorkspace< Real, Device >::host_
private

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