ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
KEDF_vW Class Reference

A class which calculates the kinetic energy, potential, and stress with von Weizsäcker (vW) KEDF. See Weizsäcker C F. Zeitschrift für Physik, 1935, 96(7): 431-458. More...

#include <kedf_vw.h>

Collaboration diagram for KEDF_vW:

Public Member Functions

 KEDF_vW ()
 ~KEDF_vW ()
void set_para (double dV, double vw_weight)
double get_energy (double **pphi, ModulePW::PW_Basis *pw_rho)
 Get the energy of vW KEDF.
double get_energy_density (double **pphi, int is, int ir, ModulePW::PW_Basis *pw_rho)
 Get the energy density of vW KEDF.
void tau_vw (const double *const *pphi, ModulePW::PW_Basis *pw_rho, double *rtau_vw)
 Get the positive definite energy density of vW KEDF.
void vw_potential (const double *const *pphi, ModulePW::PW_Basis *pw_rho, ModuleBase::matrix &rpotential)
 Get the potential of vW KEDF, and add it into rpotential, and the vW energy will be calculated and stored in this->vw_energy V_{vW}(r)=-1/2 * nabla^2 sqrt(rho(r))]/sqrt(rho(r)) NOTE that actually we calculate V_{vW} * 2 * phi = - sign(phi) * nabla^2 sqrt(rho(r) here, as a result, we need rpotential = potential * 2 * phi.
void get_stress (const double *const *pphi, ModulePW::PW_Basis *pw_rho)
 Get the stress of vW KEDF, and store it into this->stress.

Public Attributes

double vw_energy = 0.
ModuleBase::matrix stress

Private Member Functions

void laplacian_phi (const std::vector< std::vector< double > > &pphi, std::vector< std::vector< double > > &rLapPhi, ModulePW::PW_Basis *pw_rho)
 Get minus Laplacian phi.

Private Attributes

double dV_ = 0.
double vw_weight_ = 1.

Detailed Description

A class which calculates the kinetic energy, potential, and stress with von Weizsäcker (vW) KEDF. See Weizsäcker C F. Zeitschrift für Physik, 1935, 96(7): 431-458.

Author
sunliang on 2022-06

Constructor & Destructor Documentation

◆ KEDF_vW()

KEDF_vW::KEDF_vW ( )
inline

◆ ~KEDF_vW()

KEDF_vW::~KEDF_vW ( )
inline

Member Function Documentation

◆ get_energy()

double KEDF_vW::get_energy ( double ** pphi,
ModulePW::PW_Basis * pw_rho )

Get the energy of vW KEDF.

\‍[ E_{vW} = -1/2 \int{\sqrt(\rho) \nabla^2 \sqrt(\rho)} \‍]

Parameters
pphipphi^2 = rho
pw_rhopw basis
Returns
the energy of vW KEDF
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_energy_density()

double KEDF_vW::get_energy_density ( double ** pphi,
int is,
int ir,
ModulePW::PW_Basis * pw_rho )

Get the energy density of vW KEDF.

\‍[ \tau_{vW} = -1/2 \sqrt(\rho) \nabla^2 \sqrt(\rho) \‍]

Parameters
pphipphi^2 = rho
isthe index of spin
irthe index of real space grid
pw_rhopw basis
Returns
the energy density of vW KEDF
Here is the call graph for this function:

◆ get_stress()

void KEDF_vW::get_stress ( const double *const * pphi,
ModulePW::PW_Basis * pw_rho )

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

Parameters
pphipphi^2 = rho
pw_rhopw_basis
Here is the call graph for this function:

◆ laplacian_phi()

void KEDF_vW::laplacian_phi ( const std::vector< std::vector< double > > & pphi,
std::vector< std::vector< double > > & rLapPhi,
ModulePW::PW_Basis * pw_rho )
private

Get minus Laplacian phi.

Parameters
[in]pphi
[out]rLapPhi- Laplacian phi
[in]pw_rhopw basis
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_para()

void KEDF_vW::set_para ( double dV,
double vw_weight )
Here is the caller graph for this function:

◆ tau_vw()

void KEDF_vW::tau_vw ( const double *const * pphi,
ModulePW::PW_Basis * pw_rho,
double * rtau_vw )

Get the positive definite energy density of vW KEDF.

\‍[ \tau_{vW} = |\nabla \phi|^2 / 2 \‍]

Parameters
pphisqrt(rho)
pw_rhopw basis
rtau_vwrtau_vw => rtau_vw + tau_vw
Here is the call graph for this function:

◆ vw_potential()

void KEDF_vW::vw_potential ( const double *const * pphi,
ModulePW::PW_Basis * pw_rho,
ModuleBase::matrix & rpotential )

Get the potential of vW KEDF, and add it into rpotential, and the vW energy will be calculated and stored in this->vw_energy V_{vW}(r)=-1/2 * nabla^2 sqrt(rho(r))]/sqrt(rho(r)) NOTE that actually we calculate V_{vW} * 2 * phi = - sign(phi) * nabla^2 sqrt(rho(r) here, as a result, we need rpotential = potential * 2 * phi.

Parameters
pphipphi^2 = rho
pw_rhopw basis
rpotentialpotential * 2 * phi => potential * 2 * phi + V_{vW} * 2 * phi
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ dV_

double KEDF_vW::dV_ = 0.
private

◆ stress

ModuleBase::matrix KEDF_vW::stress

◆ vw_energy

double KEDF_vW::vw_energy = 0.

◆ vw_weight_

double KEDF_vW::vw_weight_ = 1.
private

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