56template <
typename FPTYPE,
typename Device = base_device::DEVICE_CPU>
72 const psi::Psi<std::complex<FPTYPE>, Device> *psi_in =
nullptr);
109 const FPTYPE *vloc_at,
139 const bool gamma_only_pw);
144 const double &tpiba2,
171 const psi::Psi<std::complex<FPTYPE>, Device> *psi_in);
197 const bool gamma_only_pw);
217 const psi::Psi<std::complex<FPTYPE>, Device> *psi_in,
257 const FPTYPE &table_interval,
295 std::complex<FPTYPE> *dqg);
Class for k-points management.
Definition klist.h:20
Definition complexmatrix.h:11
3 elements vector
Definition vector3.h:21
double float array
Definition realarray.h:21
Special pw_basis class. It includes different k-points.
Definition pw_basis_k.h:56
A class which can convert a function of "r" to the corresponding linear superposition of plane waves ...
Definition pw_basis.h:60
Symmetry analysis class.
Definition symmetry.h:24
Definition dftu_base.h:21
base_device::DEVICE_CPU * cpu_ctx
Definition stress_func.h:299
hamilt::cal_vq_deri_op< FPTYPE, Device > cal_vq_deri_op
Definition stress_func.h:330
hamilt::cal_vkb_deri_op< FPTYPE, Device > cal_vkb_deri_op
Definition stress_func.h:333
void stress_har(const UnitCell &ucell, ModuleBase::matrix &sigma, ModulePW::PW_Basis *rho_basis, const bool is_pw, const Charge *const chr)
Definition stress_har.cpp:9
Stress_Func()
Definition stress_func.h:60
base_device::memory::delete_memory_op< std::complex< FPTYPE >, Device > delmem_complex_op
Definition stress_func.h:310
void stress_kin(ModuleBase::matrix &sigma, const ModuleBase::matrix &wg, ModuleSymmetry::Symmetry *p_symm, K_Vectors *p_kv, ModulePW::PW_Basis_K *wfc_basis, const UnitCell &ucell_in, const psi::Psi< std::complex< FPTYPE >, Device > *psi_in=nullptr)
Definition stress_kin.cpp:8
base_device::memory::synchronize_memory_op< std::complex< FPTYPE >, Device, base_device::DEVICE_CPU > syncmem_complex_h2d_op
Definition stress_func.h:312
base_device::memory::delete_memory_op< FPTYPE, Device > delmem_var_op
Definition stress_func.h:320
ModuleBase::gemm_op< std::complex< FPTYPE >, Device > gemm_op
Definition stress_func.h:303
void get_dvnl1(ModuleBase::ComplexMatrix &vkb, const int ik, const int ipol, Structure_Factor *p_sf, ModulePW::PW_Basis_K *wfc_basis)
Definition stress_nl.cpp:118
base_device::memory::delete_memory_op< std::complex< FPTYPE >, base_device::DEVICE_CPU > delmem_complex_h_op
Definition stress_func.h:311
~Stress_Func()
Definition stress_func.h:61
base_device::memory::synchronize_memory_op< FPTYPE, base_device::DEVICE_CPU, Device > syncmem_var_d2h_op
Definition stress_func.h:323
void stress_pw_terms(UnitCell &ucell, ModuleBase::matrix &sigmadvl, ModuleBase::matrix &sigmahar, ModuleBase::matrix &sigmaewa, ModuleBase::matrix &sigmacc, ModuleBase::matrix &sigmaxc, const double &etxc, const Charge *const chr, ModulePW::PW_Basis *rhopw, const pseudopot_cell_vl &locpp, const Structure_Factor &sf, const int nspin, const bool domag, const bool domag_z, const int gga_grad, const bool gamma_only_pw)
Compute the plane-wave-basis stress terms shared by PW and LCAO: vlocal, hartree, ewald,...
Definition stress_loc.cpp:302
void stress_nl(ModuleBase::matrix &sigma, const ModuleBase::matrix &wg, const ModuleBase::matrix &ekb, Structure_Factor *p_sf, K_Vectors *p_kv, ModuleSymmetry::Symmetry *p_symm, ModulePW::PW_Basis_K *wfc_basis, const psi::Psi< std::complex< FPTYPE >, Device > *psi_in, const pseudopot_cell_vnl &nlpp_in, const UnitCell &ucell_in)
This routine computes the atomic force of non-local pseudopotential Stress^{NL}_{ij}...
Definition stress_nl.cpp:14
hamilt::cal_vkb_op< FPTYPE, Device > cal_vkb_op
Definition stress_func.h:332
void dvloc_of_g(const int &msh, const FPTYPE *rab, const FPTYPE *r, const FPTYPE *vloc_at, const FPTYPE &zp, FPTYPE *dvloc, ModulePW::PW_Basis *rho_basis, const UnitCell &ucell_in)
Definition stress_loc.cpp:168
void stress_gga(const UnitCell &ucell, ModuleBase::matrix &sigma, ModulePW::PW_Basis *rho_basis, const Charge *const chr, const int nspin, const bool domag, const bool domag_z, const int gga_grad)
Definition stress_gga.cpp:7
void stress_loc(const UnitCell &ucell, ModuleBase::matrix &sigma, ModulePW::PW_Basis *rho_basis, const ModuleBase::matrix &vloc, const Structure_Factor *p_sf, const bool is_pw, const Charge *const chr)
Definition stress_loc.cpp:12
void stress_ewa(const UnitCell &ucell, ModuleBase::matrix &sigma, ModulePW::PW_Basis *rho_basis, const ModuleBase::ComplexMatrix &struc_fac, const bool is_pw)
Definition stress_ewa.cpp:15
hamilt::cal_vq_op< FPTYPE, Device > cal_vq_op
Definition stress_func.h:329
pseudopot_cell_vnl * nlpp
Definition stress_func.h:336
void dqvan2(const pseudopot_cell_vnl &ppcell_in, const int ih, const int jh, const int itype, const int ipol, const int ng, const ModuleBase::Vector3< FPTYPE > *g, const FPTYPE *qnorm, const FPTYPE &tpiba, const ModuleBase::matrix &ylmk0, const ModuleBase::matrix &dylmk0, std::complex< FPTYPE > *dqg)
Compute the derivatives of the radial Fourier transform of the Q functions.
Definition stress_us.cpp:168
void stress_cc(ModuleBase::matrix &sigma, ModulePW::PW_Basis *rho_basis, UnitCell &ucell, const Structure_Factor *p_sf, const bool is_pw, const bool *numeric, const Charge *const chr, const int nspin, const bool domag, const bool domag_z, const int gga_grad, const bool gamma_only_pw)
Definition stress_cc.cpp:14
base_device::memory::synchronize_memory_op< FPTYPE, Device, base_device::DEVICE_CPU > syncmem_var_h2d_op
Definition stress_func.h:322
base_device::memory::set_memory_op< std::complex< FPTYPE >, Device > setmem_complex_op
Definition stress_func.h:309
void get_dvnl2(ModuleBase::ComplexMatrix &vkb, const int ik, Structure_Factor *p_sf, ModulePW::PW_Basis_K *wfc_basis)
Definition stress_nl.cpp:240
Device * ctx
Definition stress_func.h:298
base_device::memory::resize_memory_op< std::complex< FPTYPE >, Device > resmem_complex_op
Definition stress_func.h:307
void deriv_drhoc(const bool &numeric, const double &omega, const double &tpiba2, const int mesh, const FPTYPE *r, const FPTYPE *rab, const FPTYPE *rhoc, FPTYPE *drhocg, ModulePW::PW_Basis *rho_basis, int type)
Definition stress_cc.cpp:212
void stress_onsite(ModuleBase::matrix &sigma, const ModuleBase::matrix &wg, const ModulePW::PW_Basis_K *wfc_basis, const UnitCell &ucell_in, const Plus_U_Base &dftu, const void *psi_in, ModuleSymmetry::Symmetry *p_symm)
This routine computes the stress contribution from the DFT+U and DeltaSpin calculations Stress^{NL}...
Definition stress_onsite.cpp:25
base_device::memory::delete_memory_op< int, Device > delmem_int_op
Definition stress_func.h:326
base_device::AbacusDevice_t device
Definition stress_func.h:300
void stress_mgga(const UnitCell &ucell, ModuleBase::matrix &sigma, const ModuleBase::matrix &wg, const ModuleBase::matrix &v_ofk, const Charge *const chr, K_Vectors *p_kv, ModulePW::PW_Basis_K *wfc_basis, const psi::Psi< std::complex< FPTYPE >, Device > *psi_in)
Definition stress_mgga.cpp:15
base_device::memory::resize_memory_op< std::complex< FPTYPE >, base_device::DEVICE_CPU > resmem_complex_h_op
Definition stress_func.h:308
hamilt::cal_stress_nl_op< FPTYPE, Device > cal_stress_nl_op
Definition stress_func.h:304
base_device::memory::resize_memory_op< FPTYPE, Device > resmem_var_op
Definition stress_func.h:317
void dvloc_coulomb(const UnitCell &ucell, const FPTYPE &zp, FPTYPE *dvloc, ModulePW::PW_Basis *rho_basis)
compute the derivative of the coulomb potential in reciprocal space D V(g^2) / D g^2 = 4pi e^2/omegai...
Definition stress_loc.cpp:270
base_device::memory::synchronize_memory_op< std::complex< FPTYPE >, base_device::DEVICE_CPU, Device > syncmem_complex_d2h_op
Definition stress_func.h:314
const UnitCell * ucell
Definition stress_func.h:337
base_device::memory::delete_memory_op< FPTYPE, base_device::DEVICE_CPU > delmem_var_h_op
Definition stress_func.h:321
base_device::memory::resize_memory_op< FPTYPE, base_device::DEVICE_CPU > resmem_var_h_op
Definition stress_func.h:318
base_device::memory::resize_memory_op< int, Device > resmem_int_op
Definition stress_func.h:325
base_device::memory::synchronize_memory_op< int, Device, base_device::DEVICE_CPU > syncmem_int_h2d_op
Definition stress_func.h:327
hamilt::cal_dbecp_noevc_nl_op< FPTYPE, Device > cal_dbecp_noevc_nl_op
Definition stress_func.h:305
base_device::memory::set_memory_op< FPTYPE, Device > setmem_var_op
Definition stress_func.h:319
FPTYPE Polynomial_Interpolation_nl(const ModuleBase::realArray &table, const int &dim1, const int &dim2, const int &dim3, const FPTYPE &table_interval, const FPTYPE &x)
Definition stress_nl.cpp:359
Provide the basic information about unitcell.
Definition unitcell.h:16
AbacusDevice_t
Definition types.h:12
Definition math_kernel_op.h:298
Definition memory_op.h:115
Definition memory_op.h:17
Definition memory_op.h:31
Definition memory_op.h:61
Definition stress_op.h:14
Definition stress_op.h:57
Definition stress_op.h:194
Definition stress_op.h:178
Definition stress_op.h:232
Definition stress_op.h:215
Plus_U_Base dftu
Definition test_dftu_nao_op.cpp:11