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

#include <op_pw_vel.h>

Collaboration diagram for hamilt::Velocity< FPTYPE, Device >:

Public Member Functions

 Velocity (const ModulePW::PW_Basis_K *wfcpw_in, const int *isk_in, pseudopot_cell_vnl *ppcell_in, const UnitCell *ucell_in, const bool nonlocal_in=true, const typename GetTypeReal< FPTYPE >::type *vtau_in=nullptr, const int vtau_col_in=0, const int vtau_row_in=0)
 ~Velocity ()
void init (const int ik_in)
void init (const int ik_in, const ModuleBase::Vector3< double > &vector_potential)
 Refresh momentum and projectors with a Hartree-unit vector potential.
void act (const psi::Psi< std::complex< FPTYPE >, Device > *psi_in, const int n_npwx, const std::complex< FPTYPE > *tmpsi_in, std::complex< FPTYPE > *tmvpsi, const bool add=false) const
 calculate \hat{v}|\psi>

Public Attributes

bool nonlocal = true

Private Types

using Complex = std::complex<FPTYPE>
using resmem_var_op = base_device::memory::resize_memory_op<FPTYPE, Device>
using delmem_var_op = base_device::memory::delete_memory_op<FPTYPE, Device>
using syncmem_var_h2d_op = base_device::memory::synchronize_memory_op<FPTYPE, Device, base_device::DEVICE_CPU>
using resmem_complex_op = base_device::memory::resize_memory_op<std::complex<FPTYPE>, Device>
using delmem_complex_op = base_device::memory::delete_memory_op<std::complex<FPTYPE>, Device>

Private Attributes

const ModulePW::PW_Basis_K * wfcpw = nullptr
const int * isk = nullptr
pseudopot_cell_vnl * ppcell = nullptr
const UnitCell * ucell = nullptr
int ik = 0
double tpiba = 0.0
const GetTypeReal< FPTYPE >::type * vtau_
 [CPU] meta-GGA vtau on real grid (nspin x nrxx_smooth)
int vtau_col_ = 0
 number of grid points per spin for vtau
int vtau_row_ = 0
 number of spin channels stored in vtau_
std::complex< FPTYPE > * porter1_ = nullptr
 workspace on real grid / recip grid
std::complex< FPTYPE > * porter2_ = nullptr
 workspace on real grid / recip grid
int momentum_capacity_ = 0
std::int64_t projector_capacity_ = 0
int porter_capacity_ = 0
ProjectorGradient< FPTYPE, Device > gradient_
VelocityWorkspace< FPTYPE, Device > contraction_
Device * ctx = {}
FPTYPE * gx_ = nullptr
 [Device, npwx] x component of G+K
FPTYPE * gy_ = nullptr
 [Device, npwx] y component of G+K
FPTYPE * gz_ = nullptr
 [Device, npwx] z component of G+K
std::complex< FPTYPE > * vkb_ = nullptr
 [Device, nkb * npwk_max] nonlocal pseudopotential vkb
std::complex< FPTYPE > * gradvkb_
 [Device, 3*nkb * npwk_max] gradient of nonlocal pseudopotential gradvkb

Member Typedef Documentation

◆ Complex

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
using hamilt::Velocity< FPTYPE, Device >::Complex = std::complex<FPTYPE>
private

◆ delmem_complex_op

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
using hamilt::Velocity< FPTYPE, Device >::delmem_complex_op = base_device::memory::delete_memory_op<std::complex<FPTYPE>, Device>
private

◆ delmem_var_op

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
using hamilt::Velocity< FPTYPE, Device >::delmem_var_op = base_device::memory::delete_memory_op<FPTYPE, Device>
private

◆ resmem_complex_op

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
using hamilt::Velocity< FPTYPE, Device >::resmem_complex_op = base_device::memory::resize_memory_op<std::complex<FPTYPE>, Device>
private

◆ resmem_var_op

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
using hamilt::Velocity< FPTYPE, Device >::resmem_var_op = base_device::memory::resize_memory_op<FPTYPE, Device>
private

◆ syncmem_var_h2d_op

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
using hamilt::Velocity< FPTYPE, Device >::syncmem_var_h2d_op = base_device::memory::synchronize_memory_op<FPTYPE, Device, base_device::DEVICE_CPU>
private

Constructor & Destructor Documentation

◆ Velocity()

template<typename FPTYPE, typename Device>
hamilt::Velocity< FPTYPE, Device >::Velocity ( const ModulePW::PW_Basis_K * wfcpw_in,
const int * isk_in,
pseudopot_cell_vnl * ppcell_in,
const UnitCell * ucell_in,
const bool nonlocal_in = true,
const typename GetTypeReal< FPTYPE >::type * vtau_in = nullptr,
const int vtau_col_in = 0,
const int vtau_row_in = 0 )
Here is the call graph for this function:

◆ ~Velocity()

template<typename FPTYPE, typename Device>
hamilt::Velocity< FPTYPE, Device >::~Velocity ( )

Member Function Documentation

◆ act()

template<typename FPTYPE, typename Device>
void hamilt::Velocity< FPTYPE, Device >::act ( const psi::Psi< std::complex< FPTYPE >, Device > * psi_in,
const int n_npwx,
const std::complex< FPTYPE > * tmpsi_in,
std::complex< FPTYPE > * tmvpsi,
const bool add = false ) const

calculate \hat{v}|\psi>

Parameters
psi_inPsi class which contains some information
n_npwxnbands * NPOL
tmpsi_in|\psi_i> size: n_npwx*npwx
tmvpsi\hat{v}|\psi> size: 3*n_npwx*npwx
addtrue : tmvpsi = tmvpsi + v|\psi> false: tmvpsi = v|\psi>
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init() [1/2]

template<typename FPTYPE, typename Device>
void hamilt::Velocity< FPTYPE, Device >::init ( const int ik_in)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init() [2/2]

template<typename FPTYPE, typename Device>
void hamilt::Velocity< FPTYPE, Device >::init ( const int ik_in,
const ModuleBase::Vector3< double > & vector_potential )

Refresh momentum and projectors with a Hartree-unit vector potential.

Here is the call graph for this function:

Member Data Documentation

◆ contraction_

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
VelocityWorkspace<FPTYPE, Device> hamilt::Velocity< FPTYPE, Device >::contraction_
mutableprivate

◆ ctx

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
Device* hamilt::Velocity< FPTYPE, Device >::ctx = {}
private

◆ gradient_

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
ProjectorGradient<FPTYPE, Device> hamilt::Velocity< FPTYPE, Device >::gradient_
private

◆ gradvkb_

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
std::complex<FPTYPE>* hamilt::Velocity< FPTYPE, Device >::gradvkb_
private
Initial value:
=
nullptr

[Device, 3*nkb * npwk_max] gradient of nonlocal pseudopotential gradvkb

◆ gx_

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
FPTYPE* hamilt::Velocity< FPTYPE, Device >::gx_ = nullptr
private

[Device, npwx] x component of G+K

◆ gy_

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
FPTYPE* hamilt::Velocity< FPTYPE, Device >::gy_ = nullptr
private

[Device, npwx] y component of G+K

◆ gz_

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
FPTYPE* hamilt::Velocity< FPTYPE, Device >::gz_ = nullptr
private

[Device, npwx] z component of G+K

◆ ik

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
int hamilt::Velocity< FPTYPE, Device >::ik = 0
private

◆ isk

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
const int* hamilt::Velocity< FPTYPE, Device >::isk = nullptr
private

◆ momentum_capacity_

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
int hamilt::Velocity< FPTYPE, Device >::momentum_capacity_ = 0
private

◆ nonlocal

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
bool hamilt::Velocity< FPTYPE, Device >::nonlocal = true

◆ porter1_

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
std::complex<FPTYPE>* hamilt::Velocity< FPTYPE, Device >::porter1_ = nullptr
mutableprivate

workspace on real grid / recip grid

◆ porter2_

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
std::complex<FPTYPE>* hamilt::Velocity< FPTYPE, Device >::porter2_ = nullptr
mutableprivate

workspace on real grid / recip grid

◆ porter_capacity_

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
int hamilt::Velocity< FPTYPE, Device >::porter_capacity_ = 0
mutableprivate

◆ ppcell

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
pseudopot_cell_vnl* hamilt::Velocity< FPTYPE, Device >::ppcell = nullptr
private

◆ projector_capacity_

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
std::int64_t hamilt::Velocity< FPTYPE, Device >::projector_capacity_ = 0
private

◆ tpiba

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
double hamilt::Velocity< FPTYPE, Device >::tpiba = 0.0
private

◆ ucell

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
const UnitCell* hamilt::Velocity< FPTYPE, Device >::ucell = nullptr
private

◆ vkb_

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
std::complex<FPTYPE>* hamilt::Velocity< FPTYPE, Device >::vkb_ = nullptr
private

[Device, nkb * npwk_max] nonlocal pseudopotential vkb

◆ vtau_

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
const GetTypeReal<FPTYPE>::type* hamilt::Velocity< FPTYPE, Device >::vtau_
private
Initial value:
=
nullptr

[CPU] meta-GGA vtau on real grid (nspin x nrxx_smooth)

◆ vtau_col_

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
int hamilt::Velocity< FPTYPE, Device >::vtau_col_ = 0
private

number of grid points per spin for vtau

◆ vtau_row_

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
int hamilt::Velocity< FPTYPE, Device >::vtau_row_ = 0
private

number of spin channels stored in vtau_

◆ wfcpw

template<typename FPTYPE, typename Device = base_device::DEVICE_CPU>
const ModulePW::PW_Basis_K* hamilt::Velocity< FPTYPE, Device >::wfcpw = nullptr
private

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