ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
#include <nonlocal_maths.hpp>
Public Member Functions | |
Nonlocal_maths (const pseudopot_cell_vnl *nlpp_in, const UnitCell *ucell_in) | |
Nonlocal_maths (const ModuleBase::matrix &nhtol, const int lmax, const UnitCell *ucell_in) | |
std::vector< FPTYPE > | cal_gk (int ik, const ModulePW::PW_Basis_K *pw_basis) |
this function prepares all the q (G+k) information in one contiguous memory block including the x, y and z components, its norm and the reciprocal of its norm | |
void | cal_ylm (int lmax, int npw, const FPTYPE *gk_in, FPTYPE *ylm) |
calculate the real spherical harmonic functions on cpu (and optionally send to gpu, if gpu is available) | |
void | cal_ylm_deri (int lmax, int npw, const FPTYPE *gk_in, FPTYPE *ylm_deri) |
calculate the derivate of the sperical bessel function for projections | |
std::vector< std::complex< FPTYPE > > | cal_pref (int it, const int nh) |
calculate the (-i)^l factors | |
void | cal_vkb (int it, int ia, int npw, const FPTYPE *vq_in, const FPTYPE *ylm_in, const std::complex< FPTYPE > *sk_in, const std::complex< FPTYPE > *pref_in, std::complex< FPTYPE > *vkb_out) |
void | cal_vkb_deri (int it, int ia, int npw, int ipol, int jpol, const FPTYPE *vq_in, const FPTYPE *vq_deri_in, const FPTYPE *ylm_in, const FPTYPE *ylm_deri_in, const std::complex< FPTYPE > *sk_in, const std::complex< FPTYPE > *pref_in, const FPTYPE *gk_in, std::complex< FPTYPE > *vkb_out) |
calculate the dvkb matrix for this atom | |
void | prepare_vkb_ptr (int nbeta, double *nhtol, int nhtol_nc, int npw, int it, std::complex< FPTYPE > *vkb_out, std::complex< FPTYPE > **vkb_ptrs, FPTYPE *ylm_in, FPTYPE **ylm_ptrs, FPTYPE *vq_in, FPTYPE **vq_ptrs) |
calculate the ptr used in vkb_op | |
void | cal_dvkb_index (const int nbeta, const double *nhtol, const int nhtol_nc, const int npw, const int it, const int ipol, const int jpol, int *indexes) |
Static Public Member Functions | |
static void | dylmr2 (const int nylm, const int ngy, const FPTYPE *gk, FPTYPE *dylm, const int ipol) |
static FPTYPE | Polynomial_Interpolation_nl (const ModuleBase::realArray &table, const int &dim1, const int &dim2, const FPTYPE &table_interval, const FPTYPE &x) |
polynomial interpolation tool for calculate derivate of vq | |
Private Attributes | |
ModuleBase::matrix | nhtol_ |
int | lmax_ |
const UnitCell * | ucell_ |
Device * | ctx = {} |
base_device::DEVICE_CPU * | cpu_ctx = {} |
base_device::AbacusDevice_t | device = {} |
|
inline |
|
inline |
void hamilt::Nonlocal_maths< FPTYPE, Device >::cal_dvkb_index | ( | const int | nbeta, |
const double * | nhtol, | ||
const int | nhtol_nc, | ||
const int | npw, | ||
const int | it, | ||
const int | ipol, | ||
const int | jpol, | ||
int * | indexes | ||
) |
calculate the indexes used in vkb_deri_op indexes save (lm, nb, dylm_lm_ipol, dylm_lm_jpol) for nh
std::vector< FPTYPE > hamilt::Nonlocal_maths< FPTYPE, Device >::cal_gk | ( | int | ik, |
const ModulePW::PW_Basis_K * | pw_basis | ||
) |
this function prepares all the q (G+k) information in one contiguous memory block including the x, y and z components, its norm and the reciprocal of its norm
ik | index of k point |
pw_basis | the plane wave basis |
std::vector< std::complex< FPTYPE > > hamilt::Nonlocal_maths< FPTYPE, Device >::cal_pref | ( | int | it, |
const int | nh | ||
) |
calculate the (-i)^l factors
void hamilt::Nonlocal_maths< FPTYPE, Device >::cal_vkb | ( | int | it, |
int | ia, | ||
int | npw, | ||
const FPTYPE * | vq_in, | ||
const FPTYPE * | ylm_in, | ||
const std::complex< FPTYPE > * | sk_in, | ||
const std::complex< FPTYPE > * | pref_in, | ||
std::complex< FPTYPE > * | vkb_out | ||
) |
calculate the vkb matrix for this atom vkb = sum_lm (-i)^l * ylm(g^) * vq(g^) * sk(g^)
void hamilt::Nonlocal_maths< FPTYPE, Device >::cal_vkb_deri | ( | int | it, |
int | ia, | ||
int | npw, | ||
int | ipol, | ||
int | jpol, | ||
const FPTYPE * | vq_in, | ||
const FPTYPE * | vq_deri_in, | ||
const FPTYPE * | ylm_in, | ||
const FPTYPE * | ylm_deri_in, | ||
const std::complex< FPTYPE > * | sk_in, | ||
const std::complex< FPTYPE > * | pref_in, | ||
const FPTYPE * | gk_in, | ||
std::complex< FPTYPE > * | vkb_out | ||
) |
calculate the dvkb matrix for this atom
void hamilt::Nonlocal_maths< FPTYPE, Device >::cal_ylm | ( | int | lmax, |
int | npw, | ||
const FPTYPE * | gk_in, | ||
FPTYPE * | ylm | ||
) |
calculate the real spherical harmonic functions on cpu (and optionally send to gpu, if gpu is available)
lmax | [in] maximum angular momentum to calculate |
npw | [in] number of G+k vectors |
gk_in | [in] the G+k vectors |
ylm | [out] the spherical harmonic functions |
void hamilt::Nonlocal_maths< FPTYPE, Device >::cal_ylm_deri | ( | int | lmax, |
int | npw, | ||
const FPTYPE * | gk_in, | ||
FPTYPE * | ylm_deri | ||
) |
calculate the derivate of the sperical bessel function for projections
|
static |
|
static |
polynomial interpolation tool for calculate derivate of vq
void hamilt::Nonlocal_maths< FPTYPE, Device >::prepare_vkb_ptr | ( | int | nbeta, |
double * | nhtol, | ||
int | nhtol_nc, | ||
int | npw, | ||
int | it, | ||
std::complex< FPTYPE > * | vkb_out, | ||
std::complex< FPTYPE > ** | vkb_ptrs, | ||
FPTYPE * | ylm_in, | ||
FPTYPE ** | ylm_ptrs, | ||
FPTYPE * | vq_in, | ||
FPTYPE ** | vq_ptrs | ||
) |
calculate the ptr used in vkb_op
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |