A class which calculates the kinetic energy, potential, and stress with Luo-Karasiev-Trickey (LKT) KEDF. See Luo K, Karasiev V V, Trickey S B. Physical Review B, 2018, 98(4): 041111.
More...
#include <kedf_lkt.h >
KEDF_LKT ()
~KEDF_LKT ()
void set_para (double dV, double lkt_a)
double get_energy (const double *const *prho, ModulePW::PW_Basis *pw_rho)
Get the energy of LKT KEDF.
double get_energy_density (const double *const *prho, int is, int ir, ModulePW::PW_Basis *pw_rho)
Get the energy density of LKT KEDF.
void tau_lkt (const double *const *prho, ModulePW::PW_Basis *pw_rho, double *rtau_lkt)
void lkt_potential (const double *const *prho, ModulePW::PW_Basis *pw_rho, ModuleBase::matrix &rpotential)
Get the potential of LKT KEDF, and add it into rpotential, and the LKT energy will be calculated and stored in this->lkt_energy.
void get_stress (const double *const *prho, ModulePW::PW_Basis *pw_rho)
Get the stress of LKT KEDF, and store it into this->stress.
void nabla (const double *pinput, ModulePW::PW_Basis *pw_rho, double **routput)
Caculate routput = nabla(pinput)
void divergence (const double *const *pinput, ModulePW::PW_Basis *pw_rho, double *routput)
Caculate routput = nabla dot pinput.
void get_as (const double *prho, const double *const *pnabla_rho, const int nrxx, double *as)
Caculate as = lkt_a * s, s = c_s * |\nabla \rho|/\rho^{4/3}.
double dV_ = 0.
const double c_tf_
const double s_coef_ = 1.0 / (2. * std::pow(3 * std::pow(M_PI, 2.0), 1.0 / 3.0))
double lkt_a_ = 1.3
A class which calculates the kinetic energy, potential, and stress with Luo-Karasiev-Trickey (LKT) KEDF. See Luo K, Karasiev V V, Trickey S B. Physical Review B, 2018, 98(4): 041111.
Author sunliang on 2023-04-28
◆ KEDF_LKT()
◆ ~KEDF_LKT()
◆ divergence()
void KEDF_LKT::divergence
(
const double *const *
pinput ,
ModulePW::PW_Basis *
pw_rho ,
double *
routput
)
private
Caculate routput = nabla dot pinput.
Parameters
[in] pinput
[in] pw_rho pw basis
[out] routput
◆ get_as()
void KEDF_LKT::get_as
(
const double *
prho ,
const double *const *
pnabla_rho ,
const int
nrxx ,
double *
as
)
private
Caculate as = lkt_a * s, s = c_s * |\nabla \rho|/\rho^{4/3}.
Parameters
[in] prho charge density
[in] pnabla_rho nabla rho
[in] nrxx the number of real space grid
[out] as lkt_a * s
◆ get_energy()
Get the energy of LKT KEDF.
Parameters
prho charge density
pw_rho pw basis
Returns the energy of LKT KEDF
◆ get_energy_density()
double KEDF_LKT::get_energy_density
(
const double *const *
prho ,
int
is ,
int
ir ,
ModulePW::PW_Basis *
pw_rho
)
Get the energy density of LKT KEDF.
Parameters
prho charge density
is the index of spin
ir the index of real space grid
pw_rho pw basis
Returns the energy density of LKT KEDF
◆ get_stress()
Get the stress of LKT KEDF, and store it into this->stress.
Parameters
prho charge density
pw_rho pw basis
◆ lkt_potential()
Get the potential of LKT KEDF, and add it into rpotential, and the LKT energy will be calculated and stored in this->lkt_energy.
Parameters
prho charge density
pw_rho pw basis
rpotential rpotential => rpotential + V_{LKT}
◆ nabla()
void KEDF_LKT::nabla
(
const double *
pinput ,
ModulePW::PW_Basis *
pw_rho ,
double **
routput
)
private
Caculate routput = nabla(pinput)
Parameters
[in] pinput
[in] pw_rho pw basis
[out] routput
◆ set_para()
void KEDF_LKT::set_para
(
double
dV ,
double
lkt_a
)
◆ tau_lkt()
void KEDF_LKT::tau_lkt
(
const double *const *
prho ,
ModulePW::PW_Basis *
pw_rho ,
double *
rtau_lkt
)
◆ c_tf_
const double KEDF_LKT::c_tf_
private
Initial value: = 3.0 / 10.0 * std::pow(3 * std::pow(M_PI, 2.0), 2.0 / 3.0)
* 2
◆ dV_
double KEDF_LKT::dV_ = 0.
private
◆ lkt_a_
double KEDF_LKT::lkt_a_ = 1.3
private
◆ lkt_energy
double KEDF_LKT::lkt_energy = 0.
◆ s_coef_
const double KEDF_LKT::s_coef_ = 1.0 / (2. * std::pow(3 * std::pow(M_PI, 2.0), 1.0 / 3.0))
private
◆ stress
The documentation for this class was generated from the following files:
/home/runner/work/abacus-develop/abacus-develop/source/source_pw/module_ofdft/kedf_lkt.h
/home/runner/work/abacus-develop/abacus-develop/source/source_pw/module_ofdft/kedf_lkt.cpp