mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-12-23 04:44:03 +01:00
ee_distance_rescaled fixed;assert fails due to number mismatch
This commit is contained in:
parent
b0bfb3157c
commit
81d55b4189
@ -1654,7 +1654,7 @@ end function qmckl_compute_factor_ee_f
|
|||||||
const double* asymp_jasb,
|
const double* asymp_jasb,
|
||||||
double* const factor_ee ) {
|
double* const factor_ee ) {
|
||||||
|
|
||||||
int64_t ipar; // can we use a smaller integer?
|
int ipar; // can we use a smaller integer?
|
||||||
double pow_ser, x, spin_fact, power_ser;
|
double pow_ser, x, spin_fact, power_ser;
|
||||||
|
|
||||||
if (context == QMCKL_NULL_CONTEXT) {
|
if (context == QMCKL_NULL_CONTEXT) {
|
||||||
@ -1677,13 +1677,13 @@ end function qmckl_compute_factor_ee_f
|
|||||||
factor_ee[nw] = 0.0; // put init array here.
|
factor_ee[nw] = 0.0; // put init array here.
|
||||||
for (int j = 0; j < elec_num; ++j ) {
|
for (int j = 0; j < elec_num; ++j ) {
|
||||||
for (int i = 0; i < j; ++i) {
|
for (int i = 0; i < j; ++i) {
|
||||||
x = ee_distance_rescaled[nw][i][j];
|
x = ee_distance_rescaled[j + elec_num*(i + elec_num*nw)];
|
||||||
power_ser = 0.0;
|
power_ser = 0.0;
|
||||||
spin_fact = 1.0;
|
spin_fact = 1.0;
|
||||||
ipar = 0; // index of asymp_jasb
|
ipar = 0; // index of asymp_jasb
|
||||||
|
|
||||||
for (int p = 1; p < bord_num; ++p) {
|
for (int p = 1; p < bord_num; ++p) {
|
||||||
x = x * ee_distance_rescaled[nw][i][j];
|
x = x * ee_distance_rescaled[j + elec_num*(i + elec_num*nw)];
|
||||||
power_ser = power_ser + bord_vector[p + 1] * x;
|
power_ser = power_ser + bord_vector[p + 1] * x;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1693,9 +1693,9 @@ end function qmckl_compute_factor_ee_f
|
|||||||
}
|
}
|
||||||
|
|
||||||
factor_ee[nw] = factor_ee[nw] + spin_fact * bord_vector[0] * \
|
factor_ee[nw] = factor_ee[nw] + spin_fact * bord_vector[0] * \
|
||||||
ee_distance_rescaled[nw][i][j] / \
|
ee_distance_rescaled[j + elec_num*(i + elec_num*nw)] / \
|
||||||
(1.0 + bord_vector[1] * \
|
(1.0 + bord_vector[1] * \
|
||||||
ee_distance_rescaled[nw][i][j]) \
|
ee_distance_rescaled[j + elec_num*(i + elec_num*nw)]) \
|
||||||
-asymp_jasb[ipar] + power_ser;
|
-asymp_jasb[ipar] + power_ser;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user