ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
KEDF_XWM Class Reference

A class which calculates the kinetic energy, potential, and stress with Xie-Wang-Morales (XWM) KEDF. See Xu Q, Wang Y, Ma Y. Physical Review B, 2019, 100(20): 205132. More...

#include <kedf_xwm.h>

Collaboration diagram for KEDF_XWM:

Public Member Functions

 KEDF_XWM ()
 
 ~KEDF_XWM ()
 
void set_para (double dV, double rho_ref, double kappa, double nelec, double tf_weight, double vw_weight, ModulePW::PW_Basis *pw_rho)
 Set the parameters of XWM KEDF, and initialize kernel.
 
double get_energy (const double *const *prho, ModulePW::PW_Basis *pw_rho)
 Get the energy of XWM KEDF.
 
double get_energy_density (const double *const *prho, int is, int ir, ModulePW::PW_Basis *pw_rho)
 Get the energy density of XWM KEDF.
 
void tau_xwm (const double *const *prho, ModulePW::PW_Basis *pw_rho, double *rtau_xwm)
 Get the kinetic energy of XWM KEDF, and add it onto rtau_xwm.
 
void xwm_potential (const double *const *prho, ModulePW::PW_Basis *pw_rho, ModuleBase::matrix &rpotential)
 Get the potential of XWM KEDF, and add it into rpotential, and the XWM energy is stored in this->xwm_energy.
 
void get_stress (const double *const *prho, ModulePW::PW_Basis *pw_rho, double vw_weight)
 Get the stress of XWM KEDF, and store it into this->stress.
 

Public Attributes

double xwm_energy = 0.
 
ModuleBase::matrix stress
 

Private Member Functions

void multi_kernel (const double *const *prho, const double *kernel, double **rkernel_rho, double exponent, ModulePW::PW_Basis *pw_rho)
 Calculate \int{W(r-r')rho^{exponent}(r') dr'}.
 
void fill_kernel (double tf_weight, double vw_weight, ModulePW::PW_Basis *pw_rho)
 Fill the kernel (this->kernel_)
 

Private Attributes

double dV_ = 0.
 
double rho0_ = 0.
 
double rho_ref_ = 0.
 
double kf_ = 0.
 
double tkf_ = 0.
 
double kappa_ = 0.
 
double c_kernel = std::pow(ModuleBase::PI, 4./3.) / std::pow(3., 1. / 3.) * 2.
 
double c_0 = 0.
 
double c_1 = 0.
 
double c_2 = 0.
 
double kappa_5_6 = 0.
 
double kappa_11_6 = 0.
 
double kappa_1_6 = 0.
 
std::vector< double > kernel1_ = {}
 
std::vector< double > kernel2_ = {}
 

Detailed Description

A class which calculates the kinetic energy, potential, and stress with Xie-Wang-Morales (XWM) KEDF. See Xu Q, Wang Y, Ma Y. Physical Review B, 2019, 100(20): 205132.

Author
sunliang on 2025-01

Constructor & Destructor Documentation

◆ KEDF_XWM()

KEDF_XWM::KEDF_XWM ( )
inline
Here is the call graph for this function:

◆ ~KEDF_XWM()

KEDF_XWM::~KEDF_XWM ( )
inline

Member Function Documentation

◆ fill_kernel()

void KEDF_XWM::fill_kernel ( double  tf_weight,
double  vw_weight,
ModulePW::PW_Basis pw_rho 
)
private

Fill the kernel (this->kernel_)

Parameters
tf_weight
vw_weight
pw_rhopw_basis
Here is the caller graph for this function:

◆ get_energy()

double KEDF_XWM::get_energy ( const double *const *  prho,
ModulePW::PW_Basis pw_rho 
)

Get the energy of XWM KEDF.

Parameters
prhocharge density
pw_rhopw basis
Returns
the energy of XWM KEDF
Here is the call graph for this function:

◆ get_energy_density()

double KEDF_XWM::get_energy_density ( const double *const *  prho,
int  is,
int  ir,
ModulePW::PW_Basis pw_rho 
)

Get the energy density of XWM KEDF.

Parameters
prhocharge density
isspin index
irgrid index
pw_rhopw basis
Returns
the energy density of XWM KEDF
Here is the call graph for this function:

◆ get_stress()

void KEDF_XWM::get_stress ( const double *const *  prho,
ModulePW::PW_Basis pw_rho,
double  vw_weight 
)

Get the stress of XWM KEDF, and store it into this->stress.

Parameters
prhocharge density
pw_rhopw basis
vw_weightthe weight of vW KEDF
Here is the caller graph for this function:

◆ multi_kernel()

void KEDF_XWM::multi_kernel ( const double *const *  prho,
const double *  kernel,
double **  rkernel_rho,
double  exponent,
ModulePW::PW_Basis pw_rho 
)
private

Calculate \int{W(r-r')rho^{exponent}(r') dr'}.

Parameters
[in]prhocharge density
[in]kernelW(r-r')
[out]rkernel_rho\int{W(r-r')rho^{exponent}(r') dr'}
[in]exponentthe exponent of rho
[in]pw_rhopw_basis
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_para()

void KEDF_XWM::set_para ( double  dV,
double  rho_ref,
double  kappa,
double  nelec,
double  tf_weight,
double  vw_weight,
ModulePW::PW_Basis pw_rho 
)

Set the parameters of XWM KEDF, and initialize kernel.

Parameters
dVthe volume of one grid point in real space, omega/nxyz
rho_ref
kappa
nelecthe number of electron
tf_weight
vw_weight
pw_rhopw_basis
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tau_xwm()

void KEDF_XWM::tau_xwm ( const double *const *  prho,
ModulePW::PW_Basis pw_rho,
double *  rtau_xwm 
)

Get the kinetic energy of XWM KEDF, and add it onto rtau_xwm.

Parameters
prhocharge density
pw_rhopw basis
rtau_xwmrtau_xwm => rtau_xwm + tau_xwm
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xwm_potential()

void KEDF_XWM::xwm_potential ( const double *const *  prho,
ModulePW::PW_Basis pw_rho,
ModuleBase::matrix rpotential 
)

Get the potential of XWM KEDF, and add it into rpotential, and the XWM energy is stored in this->xwm_energy.

Parameters
prhocharge density
pw_rhopw basis
rpotentialrpotential => rpotential + V_{XWM}
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ c_0

double KEDF_XWM::c_0 = 0.
private

◆ c_1

double KEDF_XWM::c_1 = 0.
private

◆ c_2

double KEDF_XWM::c_2 = 0.
private

◆ c_kernel

double KEDF_XWM::c_kernel = std::pow(ModuleBase::PI, 4./3.) / std::pow(3., 1. / 3.) * 2.
private

◆ dV_

double KEDF_XWM::dV_ = 0.
private

◆ kappa_

double KEDF_XWM::kappa_ = 0.
private

◆ kappa_11_6

double KEDF_XWM::kappa_11_6 = 0.
private

◆ kappa_1_6

double KEDF_XWM::kappa_1_6 = 0.
private

◆ kappa_5_6

double KEDF_XWM::kappa_5_6 = 0.
private

◆ kernel1_

std::vector<double> KEDF_XWM::kernel1_ = {}
private

◆ kernel2_

std::vector<double> KEDF_XWM::kernel2_ = {}
private

◆ kf_

double KEDF_XWM::kf_ = 0.
private

◆ rho0_

double KEDF_XWM::rho0_ = 0.
private

◆ rho_ref_

double KEDF_XWM::rho_ref_ = 0.
private

◆ stress

ModuleBase::matrix KEDF_XWM::stress

◆ tkf_

double KEDF_XWM::tkf_ = 0.
private

◆ xwm_energy

double KEDF_XWM::xwm_energy = 0.

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