ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
kedf_tf.h
Go to the documentation of this file.
1#ifndef KEDF_TF_H
2#define KEDF_TF_H
3#include <math.h>
4#include <stdio.h>
5
9#include "source_base/timer.h"
10
18{
19 public:
21 {
22 this->stress.create(3, 3);
23 }
25 {
26 }
27
28 void set_para(int nx, double dV, double tf_weight);
29
30 double get_energy(const double* const* prho);
31 double get_energy_density(const double* const* prho, int is, int ir);
32 void tau_tf(const double* const* prho, double* rtau_tf);
33 void tf_potential(const double* const* prho, ModuleBase::matrix& rpotential);
34 void get_stress(double cell_vol);
35
36 double tf_energy = 0.; // TF energy
38
39 private:
40 int nx_ = 0; // number of real space points in current core
41 double dV_ = 0.; // volume element = V/nxyz
42 double tf_weight_ = 1.; // weight of TF KEDF
43 const double c_tf_
44 = 3.0 / 10.0 * std::pow(3 * std::pow(M_PI, 2.0), 2.0 / 3.0)
45 * 2; // 10/3*(3*pi^2)^{2/3}, multiply by 2 to convert unit from Hartree to Ry, finally in Ry*Bohr^(-2)
46};
47#endif
A class which calculates the kinetic energy, potential, and stress with Thomas-Fermi (TF) KEDF....
Definition kedf_tf.h:18
void set_para(int nx, double dV, double tf_weight)
Definition kedf_tf.cpp:8
double get_energy(const double *const *prho)
Get the energy of TF KEDF,.
Definition kedf_tf.cpp:22
void tf_potential(const double *const *prho, ModuleBase::matrix &rpotential)
Get the potential of TF KEDF, and add it into rpotential, and the TF energy will be calculated and st...
Definition kedf_tf.cpp:101
~KEDF_TF()
Definition kedf_tf.h:24
double tf_weight_
Definition kedf_tf.h:42
double dV_
Definition kedf_tf.h:41
int nx_
Definition kedf_tf.h:40
KEDF_TF()
Definition kedf_tf.h:20
ModuleBase::matrix stress
Definition kedf_tf.h:37
double get_energy_density(const double *const *prho, int is, int ir)
Get the energy density of TF KEDF.
Definition kedf_tf.cpp:58
const double c_tf_
Definition kedf_tf.h:44
void tau_tf(const double *const *prho, double *rtau_tf)
Get the kinetic energy of TF KEDF, and add it onto rtau_tf.
Definition kedf_tf.cpp:72
void get_stress(double cell_vol)
Get the stress of TF KEDF, and store it into this->stress.
Definition kedf_tf.cpp:132
double tf_energy
Definition kedf_tf.h:36
Definition matrix.h:19
void create(const int nrow, const int ncol, const bool flag_zero=true)
Definition matrix.cpp:122