ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
hamilt::FS_Nonlocal_tools< FPTYPE, Device > Class Template Reference

Nonlocal pseudopotential tools in plane wave basis set. used for calculating force and stress for different algorithm the main functions are: More...

#include <fs_nonlocal_tools.h>

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

Public Member Functions

 FS_Nonlocal_tools (const pseudopot_cell_vnl *nlpp_in, const UnitCell *ucell_in, const K_Vectors *kv_in, const ModulePW::PW_Basis_K *wfc_basis_in, const Structure_Factor *sf_in, const ModuleBase::matrix &wg, const ModuleBase::matrix *p_ekb)
 
 ~FS_Nonlocal_tools ()
 
void cal_vkb (const int &ik, const int &nbdall)
 calculate the projectors |beta>
 
void cal_becp (const int &ik, const int &npm, const std::complex< FPTYPE > *ppsi, const int &nbd0=0)
 calculate the becp = <psi|beta> for all beta functions
 
void reduce_pool_becp (const int &npm)
 mpi_allreduce the becp in the pool
 
void cal_vkb_deri_s (const int &ik, const int &nbdall, const int &ipol, const int &jpol)
 calculate vkb_deri
 
void cal_dbecp_s (const int &ik, const int &npm, const std::complex< FPTYPE > *ppsi, const int &nbd0=0)
 calculate the dbecp_{ij} = <psi|\partial beta/\partial varepsilon_{ij}> for all beta functions stress_{ij} = -1/omega \sum_{n,k}f_{nk} \sum_I \sum_{lm,l'm'}D_{l,l'}^{I} becp * dbecp_{ij} also calculated
 
void cal_stress (const int &ik, const int &npm, const bool &occ, const int &ipol, const int &jpol, FPTYPE *stress, const int &nbd0=0)
 calculate stress
 
void cal_vkb_deri_f (const int &ik, const int &nbdall, const int &ipol)
 calculate vkb_deri
 
void cal_dbecp_f (const int &ik, const int &nbdall, const int &npm, const int &ipol, const std::complex< FPTYPE > *ppsi, const int &nbd0=0)
 calculate the dbecp_i = <psi|\partial beta/\partial \tau^I_i> for all beta functions
 
void cal_force (const int &ik, const int &nbdall, const int &npm, const bool &occ, FPTYPE *force, const int &nbd0=0)
 calculate the force^I_i = - \sum_{n,k}f_{nk} \sum_{lm,l'm'}D_{l,l'}^{I} becp * dbecp_i
 
void revert_vkb (const int &ik, const int &ipol)
 revert the 0-value dvkbs for calculating the dbecp_i in the force calculation
 

Private Types

using gemm_op = ModuleBase::gemm_op< std::complex< FPTYPE >, Device >
 rename the operators for CPU/GPU device
 
using cal_stress_nl_op = hamilt::cal_stress_nl_op< FPTYPE, Device >
 
using cal_dbecp_noevc_nl_op = hamilt::cal_dbecp_noevc_nl_op< FPTYPE, Device >
 
using resmem_complex_op = base_device::memory::resize_memory_op< std::complex< FPTYPE >, Device >
 
using resmem_complex_h_op = base_device::memory::resize_memory_op< std::complex< FPTYPE >, base_device::DEVICE_CPU >
 
using setmem_complex_op = base_device::memory::set_memory_op< std::complex< FPTYPE >, Device >
 
using delmem_complex_op = base_device::memory::delete_memory_op< std::complex< FPTYPE >, Device >
 
using delmem_complex_h_op = base_device::memory::delete_memory_op< std::complex< FPTYPE >, base_device::DEVICE_CPU >
 
using syncmem_complex_h2d_op = base_device::memory::synchronize_memory_op< std::complex< FPTYPE >, Device, base_device::DEVICE_CPU >
 
using syncmem_complex_d2h_op = base_device::memory::synchronize_memory_op< std::complex< FPTYPE >, base_device::DEVICE_CPU, Device >
 
using resmem_var_op = base_device::memory::resize_memory_op< FPTYPE, Device >
 
using resmem_var_h_op = base_device::memory::resize_memory_op< FPTYPE, base_device::DEVICE_CPU >
 
using setmem_var_op = base_device::memory::set_memory_op< FPTYPE, Device >
 
using delmem_var_op = base_device::memory::delete_memory_op< FPTYPE, Device >
 
using delmem_var_h_op = base_device::memory::delete_memory_op< FPTYPE, base_device::DEVICE_CPU >
 
using syncmem_var_h2d_op = base_device::memory::synchronize_memory_op< FPTYPE, Device, base_device::DEVICE_CPU >
 
using syncmem_var_d2h_op = base_device::memory::synchronize_memory_op< FPTYPE, base_device::DEVICE_CPU, Device >
 
using resmem_int_op = base_device::memory::resize_memory_op< int, Device >
 
using delmem_int_op = base_device::memory::delete_memory_op< int, Device >
 
using syncmem_int_h2d_op = base_device::memory::synchronize_memory_op< int, Device, base_device::DEVICE_CPU >
 
using cal_vq_op = hamilt::cal_vq_op< FPTYPE, Device >
 
using cal_vq_deri_op = hamilt::cal_vq_deri_op< FPTYPE, Device >
 
using cal_vkb_op = hamilt::cal_vkb_op< FPTYPE, Device >
 
using cal_vkb_deri_op = hamilt::cal_vkb_deri_op< FPTYPE, Device >
 

Private Member Functions

void allocate_memory (const ModuleBase::matrix &wg, const ModuleBase::matrix *p_ekb)
 allocate the memory for the variables
 
void delete_memory ()
 delete the memory for the variables
 
void transfer_gcar (const int &npw, const int &npw_max, const FPTYPE *gcar_in)
 count zero gcar indexes and prepare zero_indexes, do gcar_y /= gcar_x, gcar_z /= gcar_y
 
void save_vkb (const int &npw, const int &ipol)
 save the 0-value dvkbs for calculating the dbecp_i in the force calculation
 

Private Attributes

const Structure_Factorsf_
 pointers to access the data without memory arrangement
 
const pseudopot_cell_vnlnlpp_
 
const UnitCellucell_
 
const K_Vectorskv_
 
const ModulePW::PW_Basis_Kwfc_basis_
 
Device * ctx = {}
 the following variables are used for the calculation
 
base_device::DEVICE_CPU * cpu_ctx = {}
 
base_device::AbacusDevice_t device = {}
 
int nkb
 
int nbands
 
int max_nh = 0
 
int max_npw = 0
 
int ntype
 
bool nondiagonal
 
int pre_ik_s = -1
 
int pre_ik_f = -1
 
int * atom_nh = nullptr
 
int * atom_na = nullptr
 
std::vector< int > h_atom_nh
 
std::vector< int > h_atom_na
 
int * gcar_zero_indexes = nullptr
 the following variables are used for transfer gcar and reuse the values of vkb for force calculation
 
int gcar_zero_counts [3] = {0, 0, 0}
 
std::complex< FPTYPE > * vkb_save = nullptr
 
FPTYPE * d_wg = nullptr
 pointers to access the data without memory arrangement
 
FPTYPE * d_wk = nullptr
 
FPTYPE * d_ekb = nullptr
 
FPTYPE * gcar = nullptr
 
FPTYPE * deeq = nullptr
 
FPTYPE * kvec_c = nullptr
 
FPTYPE * qq_nt = nullptr
 
std::complex< FPTYPE > * ppcell_vkb = nullptr
 
std::vector< FPTYPE > g_plus_k
 
FPTYPE * hd_ylm = nullptr
 allocate memory on CPU/GPU device
 
FPTYPE * hd_ylm_deri = nullptr
 
FPTYPE * hd_vq = nullptr
 
FPTYPE * hd_vq_deri = nullptr
 
std::complex< FPTYPE > * hd_sk = nullptr
 
FPTYPE * d_g_plus_k = nullptr
 allocate global memory on GPU device only
 
FPTYPE * d_pref = nullptr
 
FPTYPE * d_gk = nullptr
 
FPTYPE * d_vq_tab = nullptr
 
std::vector< int > dvkb_indexes
 
int * d_dvkb_indexes = nullptr
 
std::complex< FPTYPE > * d_pref_in = nullptr
 
std::complex< FPTYPE > * dbecp = nullptr
 becp and dbecp:
 
std::complex< FPTYPE > * becp = nullptr
 

Detailed Description

template<typename FPTYPE, typename Device>
class hamilt::FS_Nonlocal_tools< FPTYPE, Device >

Nonlocal pseudopotential tools in plane wave basis set. used for calculating force and stress for different algorithm the main functions are:

  1. cal_becp: calculate the becp = <psi|beta> for all beta functions
  2. cal_dbecp_s: calculate the dbecp_{ij} = <psi|\partial beta/\partial varepsilon_{ij}> for all beta functions stress_{ij} = -1/omega \sum_{n,k}f_{nk} \sum_I \sum_{lm,l'm'}D_{l,l'}^{I} becp * dbecp_{ij} also calculated
  3. cal_dbecp_f: calculate the dbecp_i = <psi|\partial beta/\partial \tau^I_i> for all beta functions
  4. cal_force: calculate the force^I_i = - \sum_{n,k}f_{nk} \sum_{lm,l'm'}D_{l,l'}^{I} becp * dbecp_i

Member Typedef Documentation

◆ cal_dbecp_noevc_nl_op

template<typename FPTYPE , typename Device >
using hamilt::FS_Nonlocal_tools< FPTYPE, Device >::cal_dbecp_noevc_nl_op = hamilt::cal_dbecp_noevc_nl_op<FPTYPE, Device>
private

◆ cal_stress_nl_op

template<typename FPTYPE , typename Device >
using hamilt::FS_Nonlocal_tools< FPTYPE, Device >::cal_stress_nl_op = hamilt::cal_stress_nl_op<FPTYPE, Device>
private

◆ cal_vkb_deri_op

template<typename FPTYPE , typename Device >
using hamilt::FS_Nonlocal_tools< FPTYPE, Device >::cal_vkb_deri_op = hamilt::cal_vkb_deri_op<FPTYPE, Device>
private

◆ cal_vkb_op

template<typename FPTYPE , typename Device >
using hamilt::FS_Nonlocal_tools< FPTYPE, Device >::cal_vkb_op = hamilt::cal_vkb_op<FPTYPE, Device>
private

◆ cal_vq_deri_op

template<typename FPTYPE , typename Device >
using hamilt::FS_Nonlocal_tools< FPTYPE, Device >::cal_vq_deri_op = hamilt::cal_vq_deri_op<FPTYPE, Device>
private

◆ cal_vq_op

template<typename FPTYPE , typename Device >
using hamilt::FS_Nonlocal_tools< FPTYPE, Device >::cal_vq_op = hamilt::cal_vq_op<FPTYPE, Device>
private

◆ delmem_complex_h_op

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

◆ delmem_complex_op

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

◆ delmem_int_op

template<typename FPTYPE , typename Device >
using hamilt::FS_Nonlocal_tools< FPTYPE, Device >::delmem_int_op = base_device::memory::delete_memory_op<int, Device>
private

◆ delmem_var_h_op

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

◆ delmem_var_op

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

◆ gemm_op

template<typename FPTYPE , typename Device >
using hamilt::FS_Nonlocal_tools< FPTYPE, Device >::gemm_op = ModuleBase::gemm_op<std::complex<FPTYPE>, Device>
private

rename the operators for CPU/GPU device

◆ resmem_complex_h_op

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

◆ resmem_complex_op

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

◆ resmem_int_op

template<typename FPTYPE , typename Device >
using hamilt::FS_Nonlocal_tools< FPTYPE, Device >::resmem_int_op = base_device::memory::resize_memory_op<int, Device>
private

◆ resmem_var_h_op

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

◆ resmem_var_op

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

◆ setmem_complex_op

template<typename FPTYPE , typename Device >
using hamilt::FS_Nonlocal_tools< FPTYPE, Device >::setmem_complex_op = base_device::memory::set_memory_op<std::complex<FPTYPE>, Device>
private

◆ setmem_var_op

template<typename FPTYPE , typename Device >
using hamilt::FS_Nonlocal_tools< FPTYPE, Device >::setmem_var_op = base_device::memory::set_memory_op<FPTYPE, Device>
private

◆ syncmem_complex_d2h_op

template<typename FPTYPE , typename Device >
using hamilt::FS_Nonlocal_tools< FPTYPE, Device >::syncmem_complex_d2h_op = base_device::memory::synchronize_memory_op<std::complex<FPTYPE>, base_device::DEVICE_CPU, Device>
private

◆ syncmem_complex_h2d_op

template<typename FPTYPE , typename Device >
using hamilt::FS_Nonlocal_tools< FPTYPE, Device >::syncmem_complex_h2d_op = base_device::memory::synchronize_memory_op<std::complex<FPTYPE>, Device, base_device::DEVICE_CPU>
private

◆ syncmem_int_h2d_op

template<typename FPTYPE , typename Device >
using hamilt::FS_Nonlocal_tools< FPTYPE, Device >::syncmem_int_h2d_op = base_device::memory::synchronize_memory_op<int, Device, base_device::DEVICE_CPU>
private

◆ syncmem_var_d2h_op

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

◆ syncmem_var_h2d_op

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

Constructor & Destructor Documentation

◆ FS_Nonlocal_tools()

template<typename FPTYPE , typename Device >
hamilt::FS_Nonlocal_tools< FPTYPE, Device >::FS_Nonlocal_tools ( const pseudopot_cell_vnl nlpp_in,
const UnitCell ucell_in,
const K_Vectors kv_in,
const ModulePW::PW_Basis_K wfc_basis_in,
const Structure_Factor sf_in,
const ModuleBase::matrix wg,
const ModuleBase::matrix p_ekb 
)
Here is the call graph for this function:

◆ ~FS_Nonlocal_tools()

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

Member Function Documentation

◆ allocate_memory()

template<typename FPTYPE , typename Device >
void hamilt::FS_Nonlocal_tools< FPTYPE, Device >::allocate_memory ( const ModuleBase::matrix wg,
const ModuleBase::matrix p_ekb 
)
private

allocate the memory for the variables

Here is the caller graph for this function:

◆ cal_becp()

template<typename FPTYPE , typename Device >
void hamilt::FS_Nonlocal_tools< FPTYPE, Device >::cal_becp ( const int &  ik,
const int &  npm,
const std::complex< FPTYPE > *  ppsi,
const int &  nbd0 = 0 
)

calculate the becp = <psi|beta> for all beta functions

Parameters
ikthe index of k point
npmthe number of bands
ppsithe wave functions
nbd0the start index of the bands
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_dbecp_f()

template<typename FPTYPE , typename Device >
void hamilt::FS_Nonlocal_tools< FPTYPE, Device >::cal_dbecp_f ( const int &  ik,
const int &  nbdall,
const int &  npm,
const int &  ipol,
const std::complex< FPTYPE > *  ppsi,
const int &  nbd0 = 0 
)

calculate the dbecp_i = <psi|\partial beta/\partial \tau^I_i> for all beta functions

Parameters
ikthe index of k point
nbdallthe number of all bands, which is the dimension of dbecp and becp
npmthe number of bands
ipolthe index of the polar
ppsithe wave functions
nbd0the start index of the bands
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_dbecp_s()

template<typename FPTYPE , typename Device >
void hamilt::FS_Nonlocal_tools< FPTYPE, Device >::cal_dbecp_s ( const int &  ik,
const int &  npm,
const std::complex< FPTYPE > *  ppsi,
const int &  nbd0 = 0 
)

calculate the dbecp_{ij} = <psi|\partial beta/\partial varepsilon_{ij}> for all beta functions stress_{ij} = -1/omega \sum_{n,k}f_{nk} \sum_I \sum_{lm,l'm'}D_{l,l'}^{I} becp * dbecp_{ij} also calculated

Parameters
ikthe index of k point
npmthe number of bands
ppsithe wave functions
nbd0the start index of the bands
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_force()

template<typename FPTYPE , typename Device >
void hamilt::FS_Nonlocal_tools< FPTYPE, Device >::cal_force ( const int &  ik,
const int &  nbdall,
const int &  npm,
const bool &  occ,
FPTYPE *  force,
const int &  nbd0 = 0 
)

calculate the force^I_i = - \sum_{n,k}f_{nk} \sum_{lm,l'm'}D_{l,l'}^{I} becp * dbecp_i

Parameters
ikthe index of k point
npmthe number of bands
nbdallthe number of all bands, which is the dimension of dbecp and becp
nbd0start band index for dbecp and becp
occif use the occupation of the bands
force[out] the force
Here is the caller graph for this function:

◆ cal_stress()

template<typename FPTYPE , typename Device >
void hamilt::FS_Nonlocal_tools< FPTYPE, Device >::cal_stress ( const int &  ik,
const int &  npm,
const bool &  occ,
const int &  ipol,
const int &  jpol,
FPTYPE *  stress,
const int &  nbd0 = 0 
)

calculate stress

Parameters
ikthe index of k point
npmthe number of bands
occif use the occupation of the bands
ipolthe i index of the direction
jpolthe j index of the direction
stress[out] the stress tensor
nbd0the start index of the bands
Here is the caller graph for this function:

◆ cal_vkb()

template<typename FPTYPE , typename Device >
void hamilt::FS_Nonlocal_tools< FPTYPE, Device >::cal_vkb ( const int &  ik,
const int &  nbdall 
)

calculate the projectors |beta>

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

◆ cal_vkb_deri_f()

template<typename FPTYPE , typename Device >
void hamilt::FS_Nonlocal_tools< FPTYPE, Device >::cal_vkb_deri_f ( const int &  ik,
const int &  nbdall,
const int &  ipol 
)

calculate vkb_deri

Parameters
ikthe index of k point
nbdallthe number of all bands, it decides the size of vkb_deri
ipolthe index of the polar
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_vkb_deri_s()

template<typename FPTYPE , typename Device >
void hamilt::FS_Nonlocal_tools< FPTYPE, Device >::cal_vkb_deri_s ( const int &  ik,
const int &  nbdall,
const int &  ipol,
const int &  jpol 
)

calculate vkb_deri

Parameters
ikthe index of k point
nbdallthe number of all bands, it decides the size of vkb_deri
ipolthe i index of the direction
jpolthe j index of the direction
Here is the call graph for this function:
Here is the caller graph for this function:

◆ delete_memory()

template<typename FPTYPE , typename Device >
void hamilt::FS_Nonlocal_tools< FPTYPE, Device >::delete_memory ( )
private

delete the memory for the variables

◆ reduce_pool_becp()

template<typename FPTYPE , typename Device >
void hamilt::FS_Nonlocal_tools< FPTYPE, Device >::reduce_pool_becp ( const int &  npm)

mpi_allreduce the becp in the pool

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

◆ revert_vkb()

template<typename FPTYPE , typename Device >
void hamilt::FS_Nonlocal_tools< FPTYPE, Device >::revert_vkb ( const int &  ik,
const int &  ipol 
)

revert the 0-value dvkbs for calculating the dbecp_i in the force calculation

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

◆ save_vkb()

template<typename FPTYPE , typename Device >
void hamilt::FS_Nonlocal_tools< FPTYPE, Device >::save_vkb ( const int &  npw,
const int &  ipol 
)
private

save the 0-value dvkbs for calculating the dbecp_i in the force calculation

◆ transfer_gcar()

template<typename FPTYPE , typename Device >
void hamilt::FS_Nonlocal_tools< FPTYPE, Device >::transfer_gcar ( const int &  npw,
const int &  npw_max,
const FPTYPE *  gcar_in 
)
private

count zero gcar indexes and prepare zero_indexes, do gcar_y /= gcar_x, gcar_z /= gcar_y

Member Data Documentation

◆ atom_na

template<typename FPTYPE , typename Device >
int* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::atom_na = nullptr
private

◆ atom_nh

template<typename FPTYPE , typename Device >
int* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::atom_nh = nullptr
private

◆ becp

template<typename FPTYPE , typename Device >
std::complex<FPTYPE>* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::becp = nullptr
private

◆ cpu_ctx

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

◆ ctx

template<typename FPTYPE , typename Device >
Device* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::ctx = {}
private

the following variables are used for the calculation

◆ d_dvkb_indexes

template<typename FPTYPE , typename Device >
int* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::d_dvkb_indexes = nullptr
private

◆ d_ekb

template<typename FPTYPE , typename Device >
FPTYPE* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::d_ekb = nullptr
private

◆ d_g_plus_k

template<typename FPTYPE , typename Device >
FPTYPE* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::d_g_plus_k = nullptr
private

allocate global memory on GPU device only

◆ d_gk

template<typename FPTYPE , typename Device >
FPTYPE* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::d_gk = nullptr
private

◆ d_pref

template<typename FPTYPE , typename Device >
FPTYPE* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::d_pref = nullptr
private

◆ d_pref_in

template<typename FPTYPE , typename Device >
std::complex<FPTYPE>* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::d_pref_in = nullptr
private

◆ d_vq_tab

template<typename FPTYPE , typename Device >
FPTYPE* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::d_vq_tab = nullptr
private

◆ d_wg

template<typename FPTYPE , typename Device >
FPTYPE* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::d_wg = nullptr
private

pointers to access the data without memory arrangement


◆ d_wk

template<typename FPTYPE , typename Device >
FPTYPE* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::d_wk = nullptr
private

◆ dbecp

template<typename FPTYPE , typename Device >
std::complex<FPTYPE>* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::dbecp = nullptr
private

becp and dbecp:

◆ deeq

template<typename FPTYPE , typename Device >
FPTYPE* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::deeq = nullptr
private

◆ device

template<typename FPTYPE , typename Device >
base_device::AbacusDevice_t hamilt::FS_Nonlocal_tools< FPTYPE, Device >::device = {}
private

◆ dvkb_indexes

template<typename FPTYPE , typename Device >
std::vector<int> hamilt::FS_Nonlocal_tools< FPTYPE, Device >::dvkb_indexes
private

◆ g_plus_k

template<typename FPTYPE , typename Device >
std::vector<FPTYPE> hamilt::FS_Nonlocal_tools< FPTYPE, Device >::g_plus_k
private

the following variables are used for the calculation allocate memory on CPU device only

◆ gcar

template<typename FPTYPE , typename Device >
FPTYPE* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::gcar = nullptr
private

◆ gcar_zero_counts

template<typename FPTYPE , typename Device >
int hamilt::FS_Nonlocal_tools< FPTYPE, Device >::gcar_zero_counts[3] = {0, 0, 0}
private

◆ gcar_zero_indexes

template<typename FPTYPE , typename Device >
int* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::gcar_zero_indexes = nullptr
private

the following variables are used for transfer gcar and reuse the values of vkb for force calculation

----------------------— Key optimization ----------------------—

◆ h_atom_na

template<typename FPTYPE , typename Device >
std::vector<int> hamilt::FS_Nonlocal_tools< FPTYPE, Device >::h_atom_na
private

◆ h_atom_nh

template<typename FPTYPE , typename Device >
std::vector<int> hamilt::FS_Nonlocal_tools< FPTYPE, Device >::h_atom_nh
private

◆ hd_sk

template<typename FPTYPE , typename Device >
std::complex<FPTYPE>* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::hd_sk = nullptr
private

◆ hd_vq

template<typename FPTYPE , typename Device >
FPTYPE* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::hd_vq = nullptr
private

◆ hd_vq_deri

template<typename FPTYPE , typename Device >
FPTYPE* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::hd_vq_deri = nullptr
private

◆ hd_ylm

template<typename FPTYPE , typename Device >
FPTYPE* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::hd_ylm = nullptr
private

allocate memory on CPU/GPU device

◆ hd_ylm_deri

template<typename FPTYPE , typename Device >
FPTYPE* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::hd_ylm_deri = nullptr
private

◆ kv_

template<typename FPTYPE , typename Device >
const K_Vectors* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::kv_
private

◆ kvec_c

template<typename FPTYPE , typename Device >
FPTYPE* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::kvec_c = nullptr
private

◆ max_nh

template<typename FPTYPE , typename Device >
int hamilt::FS_Nonlocal_tools< FPTYPE, Device >::max_nh = 0
private

◆ max_npw

template<typename FPTYPE , typename Device >
int hamilt::FS_Nonlocal_tools< FPTYPE, Device >::max_npw = 0
private

◆ nbands

template<typename FPTYPE , typename Device >
int hamilt::FS_Nonlocal_tools< FPTYPE, Device >::nbands
private

◆ nkb

template<typename FPTYPE , typename Device >
int hamilt::FS_Nonlocal_tools< FPTYPE, Device >::nkb
private

◆ nlpp_

template<typename FPTYPE , typename Device >
const pseudopot_cell_vnl* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::nlpp_
private

◆ nondiagonal

template<typename FPTYPE , typename Device >
bool hamilt::FS_Nonlocal_tools< FPTYPE, Device >::nondiagonal
private

◆ ntype

template<typename FPTYPE , typename Device >
int hamilt::FS_Nonlocal_tools< FPTYPE, Device >::ntype
private

◆ ppcell_vkb

template<typename FPTYPE , typename Device >
std::complex<FPTYPE>* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::ppcell_vkb = nullptr
private

------------------— Key variable ------------------— borrow the memory from the vkb in VNL_in_pw to calculate vkb and dvkb

◆ pre_ik_f

template<typename FPTYPE , typename Device >
int hamilt::FS_Nonlocal_tools< FPTYPE, Device >::pre_ik_f = -1
private

◆ pre_ik_s

template<typename FPTYPE , typename Device >
int hamilt::FS_Nonlocal_tools< FPTYPE, Device >::pre_ik_s = -1
private

◆ qq_nt

template<typename FPTYPE , typename Device >
FPTYPE* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::qq_nt = nullptr
private

◆ sf_

template<typename FPTYPE , typename Device >
const Structure_Factor* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::sf_
private

pointers to access the data without memory arrangement

◆ ucell_

template<typename FPTYPE , typename Device >
const UnitCell* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::ucell_
private

◆ vkb_save

template<typename FPTYPE , typename Device >
std::complex<FPTYPE>* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::vkb_save = nullptr
private

◆ wfc_basis_

template<typename FPTYPE , typename Device >
const ModulePW::PW_Basis_K* hamilt::FS_Nonlocal_tools< FPTYPE, Device >::wfc_basis_
private

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