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
8#include "source_base/timer.h"
9
17{
18 public:
20 {
21 this->stress.create(3, 3);
22 }
24 {
25 }
26
27 void set_para(int nx, double dV, double tf_weight);
28
29 double get_energy(const double* const* prho);
30 double get_energy_density(const double* const* prho, int is, int ir);
31 void tau_tf(const double* const* prho, double* rtau_tf);
32 void tf_potential(const double* const* prho, ModuleBase::matrix& rpotential);
33 void get_stress(double cell_vol);
34
35 double tf_energy = 0.; // TF energy
37
38 private:
39 int nx_ = 0; // number of real space points in current core
40 double dV_ = 0.; // volume element = V/nxyz
41 double tf_weight_ = 1.; // weight of TF KEDF
42 const double c_tf_
43 = 3.0 / 10.0 * std::pow(3 * std::pow(M_PI, 2.0), 2.0 / 3.0)
44 * 2; // 10/3*(3*pi^2)^{2/3}, multiply by 2 to convert unit from Hartree to Ry, finally in Ry*Bohr^(-2)
45};
46#endif
A class which calculates the kinetic energy, potential, and stress with Thomas-Fermi (TF) KEDF....
Definition kedf_tf.h:17
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:23
double tf_weight_
Definition kedf_tf.h:41
double dV_
Definition kedf_tf.h:40
int nx_
Definition kedf_tf.h:39
KEDF_TF()
Definition kedf_tf.h:19
ModuleBase::matrix stress
Definition kedf_tf.h:36
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:43
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:35
Definition matrix.h:18
void create(const int nrow, const int ncol, const bool flag_zero=true)
Definition matrix.cpp:125