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

#include <sto_stress_pw.h>

Inheritance diagram for Sto_Stress_PW< FPTYPE, Device >:
Collaboration diagram for Sto_Stress_PW< FPTYPE, Device >:

Public Member Functions

 Sto_Stress_PW ()
 
 ~Sto_Stress_PW ()
 
void cal_stress (ModuleBase::matrix &sigmatot, const elecstate::ElecState &elec, ModulePW::PW_Basis *rho_basis, ModuleSymmetry::Symmetry *p_symm, Structure_Factor *p_sf, K_Vectors *p_kv, ModulePW::PW_Basis_K *wfc_basis, const psi::Psi< std::complex< FPTYPE >, Device > &psi_in, const Stochastic_WF< std::complex< FPTYPE >, Device > &stowf, const Charge *const chr, const pseudopot_cell_vl *locpp, const pseudopot_cell_vnl *nlpp, UnitCell &ucell_in)
 
- Public Member Functions inherited from Stress_Func< FPTYPE, Device >
 Stress_Func ()
 
 ~Stress_Func ()
 
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)
 
void stress_har (const UnitCell &ucell, ModuleBase::matrix &sigma, ModulePW::PW_Basis *rho_basis, const bool is_pw, const Charge *const chr)
 
void stress_ewa (const UnitCell &ucell, ModuleBase::matrix &sigma, ModulePW::PW_Basis *rho_basis, const bool is_pw)
 
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)
 
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)
 
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 /G^4
 
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)
 
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)
 
void stress_gga (const UnitCell &ucell, ModuleBase::matrix &sigma, ModulePW::PW_Basis *rho_basis, const Charge *const chr)
 
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)
 
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} = -1/\Omega \sum_{n,k}f_{nk}\sum_I \sum_{lm,l'm'}D_{l,l'}^{I} [ \sum_G \langle c_{nk}(\mathbf{G+K})|\beta_{lm}^I(\mathbf{G+K})\rangle * \sum_{G'}\langle \partial \beta_{lm}^I(\mathbf{G+K})/\partial \varepsilon_{ij} |c_{nk}(\mathbf{G+K})\rangle ] there would be three parts in the above equation: (1) sum over becp and dbecp with D_{l,l'}^{I} --— first line in the above equation (2) calculate becp = <psi | beta> --— second line in the above equation (3) calculate dbecp = <psi | dbeta> --— third line in the above equation.
 
void stress_onsite (ModuleBase::matrix &sigma, const ModuleBase::matrix &wg, const ModulePW::PW_Basis_K *wfc_basis, const UnitCell &ucell_in, const psi::Psi< std::complex< FPTYPE >, Device > *psi_in, ModuleSymmetry::Symmetry *p_symm)
 This routine computes the stress contribution from the DFT+U and DeltaSpin calculations Stress^{NL}_{ij} = -1/\Omega \sum_{n,k}f_{nk}\sum_I \sum_{lm,l'm'}(V^U_{lmm'\sigma\sigma'} + f(\lambda,\sigma\sigma')) [ \sum_G \langle c_{nk}(\mathbf{G+K})|\alpha_{lm}^I(\mathbf{G+K})\rangle * \sum_{G'}\langle \partial \alpha_{lm}^I(\mathbf{G+K})/\partial \varepsilon_{ij} |c_{nk}(\mathbf{G+K})\rangle ] there would be three parts in the above equation: (1) sum over becp and dbecp with f(U+\lambda, \sigma\sigma', lmm')^{I} --— first line in the above equation (2) calculate becp = <psi | alpha> --— second line in the above equation (3) calculate dbecp = <psi | dalpha> --— third line in the above equation.
 
void get_dvnl1 (ModuleBase::ComplexMatrix &vkb, const int ik, const int ipol, Structure_Factor *p_sf, ModulePW::PW_Basis_K *wfc_basis)
 
void get_dvnl2 (ModuleBase::ComplexMatrix &vkb, const int ik, Structure_Factor *p_sf, ModulePW::PW_Basis_K *wfc_basis)
 
FPTYPE Polynomial_Interpolation_nl (const ModuleBase::realArray &table, const int &dim1, const int &dim2, const int &dim3, const FPTYPE &table_interval, const FPTYPE &x)
 
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.
 

Private Types

using resmem_var_op = base_device::memory::resize_memory_op< FPTYPE, Device >
 
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 syncmem_var_d2h_op = base_device::memory::synchronize_memory_op< FPTYPE, base_device::DEVICE_CPU, Device >
 

Private Member Functions

void sto_stress_kin (ModuleBase::matrix &sigma, const ModuleBase::matrix &wg, ModuleSymmetry::Symmetry *p_symm, K_Vectors *p_kv, ModulePW::PW_Basis_K *wfc_basis, const psi::Psi< std::complex< FPTYPE >, Device > &psi_in, const Stochastic_WF< std::complex< FPTYPE >, Device > &stowf)
 
void sto_stress_nl (ModuleBase::matrix &sigma, const ModuleBase::matrix &wg, Structure_Factor *p_sf, ModuleSymmetry::Symmetry *p_symm, K_Vectors *p_kv, ModulePW::PW_Basis_K *wfc_basis, const pseudopot_cell_vnl &nlpp, const UnitCell &ucell, const psi::Psi< std::complex< FPTYPE >, Device > &psi, const Stochastic_WF< std::complex< FPTYPE >, Device > &stowf)
 

Additional Inherited Members

- Protected Attributes inherited from Stress_Func< FPTYPE, Device >
Device * ctx = {}
 
base_device::DEVICE_CPU * cpu_ctx = {}
 
base_device::AbacusDevice_t device = {}
 
pseudopot_cell_vnlnlpp = nullptr
 
const UnitCellucell = nullptr
 

Member Typedef Documentation

◆ delmem_var_op

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

◆ resmem_var_op

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

◆ setmem_var_op

template<typename FPTYPE , typename Device = base_device::DEVICE_CPU>
using Sto_Stress_PW< FPTYPE, Device >::setmem_var_op = base_device::memory::set_memory_op<FPTYPE, Device>
private

◆ syncmem_var_d2h_op

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

Constructor & Destructor Documentation

◆ Sto_Stress_PW()

template<typename FPTYPE , typename Device = base_device::DEVICE_CPU>
Sto_Stress_PW< FPTYPE, Device >::Sto_Stress_PW ( )
inline

◆ ~Sto_Stress_PW()

template<typename FPTYPE , typename Device = base_device::DEVICE_CPU>
Sto_Stress_PW< FPTYPE, Device >::~Sto_Stress_PW ( )
inline

Member Function Documentation

◆ cal_stress()

template<typename FPTYPE , typename Device >
void Sto_Stress_PW< FPTYPE, Device >::cal_stress ( ModuleBase::matrix sigmatot,
const elecstate::ElecState elec,
ModulePW::PW_Basis rho_basis,
ModuleSymmetry::Symmetry p_symm,
Structure_Factor p_sf,
K_Vectors p_kv,
ModulePW::PW_Basis_K wfc_basis,
const psi::Psi< std::complex< FPTYPE >, Device > &  psi_in,
const Stochastic_WF< std::complex< FPTYPE >, Device > &  stowf,
const Charge *const  chr,
const pseudopot_cell_vl locpp,
const pseudopot_cell_vnl nlpp,
UnitCell ucell_in 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sto_stress_kin()

template<typename FPTYPE , typename Device >
void Sto_Stress_PW< FPTYPE, Device >::sto_stress_kin ( ModuleBase::matrix sigma,
const ModuleBase::matrix wg,
ModuleSymmetry::Symmetry p_symm,
K_Vectors p_kv,
ModulePW::PW_Basis_K wfc_basis,
const psi::Psi< std::complex< FPTYPE >, Device > &  psi_in,
const Stochastic_WF< std::complex< FPTYPE >, Device > &  stowf 
)
private
Here is the call graph for this function:

◆ sto_stress_nl()

template<typename FPTYPE , typename Device >
void Sto_Stress_PW< FPTYPE, Device >::sto_stress_nl ( ModuleBase::matrix sigma,
const ModuleBase::matrix wg,
Structure_Factor p_sf,
ModuleSymmetry::Symmetry p_symm,
K_Vectors p_kv,
ModulePW::PW_Basis_K wfc_basis,
const pseudopot_cell_vnl nlpp,
const UnitCell ucell,
const psi::Psi< std::complex< FPTYPE >, Device > &  psi,
const Stochastic_WF< std::complex< FPTYPE >, Device > &  stowf 
)
private
Here is the call graph for this function:

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