Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
qbox
qbox-public
Commits
f55ce083
Commit
f55ce083
authored
Jul 02, 2022
by
Francois Gygi
Browse files
Cleanup/fix small density tests in RSH, HSE
parent
a41afb32
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/HSEFunctional.cpp
View file @
f55ce083
...
...
@@ -711,10 +711,7 @@ void PBE_correlation(const double rho, const double grad, double *ec,
*
vc1
=
0.0
;
*
vc2
=
0.0
;
if
(
rho
<
1.e-18
)
{
return
;
}
if
(
rho
<
1.e-18
)
return
;
const
double
third
=
1.0
/
3.0
;
const
double
pi32third
=
3.09366772628014
;
/* (3*pi^2 ) ^(1/3) */
...
...
@@ -787,6 +784,8 @@ void PBE_correlation_sp(const double rho_up, const double rho_dn,
*
vc1_dn
=
0.0
;
*
vc2
=
0.0
;
if
(
rho_up
<
1.e-18
&&
rho_dn
<
1.e-18
)
return
;
const
double
rh_up
=
(
rho_up
<
1.e-18
)
?
0.0
:
rho_up
;
const
double
rh_dn
=
(
rho_dn
<
1.e-18
)
?
0.0
:
rho_dn
;
...
...
src/RSHFunctional.cpp
View file @
f55ce083
...
...
@@ -716,10 +716,7 @@ void RSHFunctional::PBE_correlation(const double rho, const double grad,
*
vc1
=
0.0
;
*
vc2
=
0.0
;
if
(
rho
<
1.e-18
)
{
return
;
}
if
(
rho
<
1.e-18
)
return
;
const
double
third
=
1.0
/
3.0
;
const
double
pi32third
=
3.09366772628014
;
/* (3*pi^2 ) ^(1/3) */
...
...
@@ -792,6 +789,8 @@ void RSHFunctional::PBE_correlation_sp(const double rho_up, const double rho_dn,
*
vc1_dn
=
0.0
;
*
vc2
=
0.0
;
if
(
rho_up
<
1.e-18
&&
rho_dn
<
1.e-18
)
return
;
const
double
rh_up
=
(
rho_up
<
1.e-18
)
?
0.0
:
rho_up
;
const
double
rh_dn
=
(
rho_dn
<
1.e-18
)
?
0.0
:
rho_dn
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment