Skip to content

Commit 408e349

Browse files
author
fakeone
committed
fixing grammar errors
1 parent 4234b0f commit 408e349

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

source/module_hamilt_general/module_xc/xc_functional.cpp

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@ std::vector<int> XC_Functional::func_id(1);
1818
int XC_Functional::func_type = 0;
1919
bool XC_Functional::use_libxc = true;
2020
double XC_Functional::hybrid_alpha = 0.25;
21-
double static XC_Functional::default_dft_threshold=1.0e-10;
21+
double XC_Functional::default_dft_threshold=1.0e-10;
22+
double XC_Functional::dens_threshold=1.0e-10;
23+
double XC_Functional::zeta_threshold=1.0e-10;
24+
double XC_Functional::grho_threshold=1.0e-10;
25+
double XC_Functional::tau_threshold=1.0e-10;
2226

23-
void XC_Functional::set_dft_ingred_thrs(const double d_thr=default_dft_threshold,
24-
const double z_thr=default_dft_threshold,
25-
const double g_thr=default_dft_threshold,
26-
const double t_thr=default_dft_threshold)
27+
void XC_Functional::set_dft_ingred_thrs(double d_thr, double z_thr, double g_thr, double t_thr)
2728
{ dens_threshold = d_thr;
2829
zeta_threshold = z_thr;
2930
grho_threshold = g_thr;
@@ -50,11 +51,6 @@ double XC_Functional::get_tau_threshold()
5051
return tau_threshold;
5152
}
5253

53-
void XC_Functional::set_hybrid_alpha(const double alpha_in)
54-
{
55-
hybrid_alpha = alpha_in;
56-
}
57-
5854
double XC_Functional::get_hybrid_alpha()
5955
{
6056
return hybrid_alpha;
@@ -75,7 +71,6 @@ void XC_Functional::set_xc_first_loop(const UnitCell& ucell)
7571
the first scf iteration only calculate the functional without exact
7672
exchange. but in "nscf" calculation, there is no need of "two-level"
7773
method. */
78-
XC_Functional::set_dft_ingred_thrs();
7974
if (ucell.atoms[0].ncpp.xc_func == "HF"
8075
|| ucell.atoms[0].ncpp.xc_func == "PBE0"
8176
|| ucell.atoms[0].ncpp.xc_func == "HSE") {

source/module_hamilt_general/module_xc/xc_functional.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ class XC_Functional
6565
static int get_func_type();
6666
static void set_xc_type(const std::string xc_func_in);
6767

68+
static void set_dft_ingred_thrs(double d_thr, double z_thr, double g_thr, double t_thr);
69+
static double get_dens_threshold();
70+
static double get_grho_threshold();
71+
static double get_zeta_threshold();
72+
static double get_tau_threshold();
73+
6874
// For hybrid functional
6975
static void set_hybrid_alpha(const double alpha_in);
7076
static double get_hybrid_alpha();
@@ -77,10 +83,14 @@ class XC_Functional
7783
static int func_type; //0:none, 1:lda, 2:gga, 3:mgga, 4:hybrid lda/gga, 5:hybrid mgga
7884
static bool use_libxc;
7985

86+
87+
static double dens_threshold;
88+
static double grho_threshold;
89+
static double zeta_threshold;
90+
static double tau_threshold;
91+
static double default_dft_threshold;
8092
//exx_hybrid_alpha for mixing exx in hybrid functional:
8193
static double hybrid_alpha;
82-
static double dens_threshold, zeta_threshold, grho_threshold, tau_threshold;
83-
static double default_dft_threshold;
8494

8595
public:
8696
static std::vector<int> get_func_id() { return func_id; }

0 commit comments

Comments
 (0)