Attempt to fix the Ewald sum SSWF phase bug
This commit is contained in:
parent
788a990a29
commit
7599c22d06
|
@ -455,7 +455,7 @@ int ewald3_21_xy_sigma_long (
|
||||||
assert((n-abs(m))/2 == c->s1_jMaxes[y]);
|
assert((n-abs(m))/2 == c->s1_jMaxes[y]);
|
||||||
for(qpms_l_t j = 0; j <= c->s1_jMaxes[y]/*(n-abs(m))/2*/; ++j) { // FIXME </<= ?
|
for(qpms_l_t j = 0; j <= c->s1_jMaxes[y]/*(n-abs(m))/2*/; ++j) { // FIXME </<= ?
|
||||||
complex double summand = rbeta_pq_div_k_pow[n-2*j]
|
complex double summand = rbeta_pq_div_k_pow[n-2*j]
|
||||||
* e_imalpha_pq * c->legendre0[gsl_sf_legendre_array_index(n,abs(m))] * min1pow_m_neg(m) // This line can actually go outside j-loop
|
* e_imalpha_pq * c->legendre0[gsl_sf_legendre_array_index(n,abs(m))] * min1pow(m) // This line can actually go outside j-loop
|
||||||
* gamma_pq_powm1[2*j]// * Gamma_pq[j] bellow (GGG) after error computation
|
* gamma_pq_powm1[2*j]// * Gamma_pq[j] bellow (GGG) after error computation
|
||||||
* c->s1_constfacs[y][j];
|
* c->s1_constfacs[y][j];
|
||||||
if(err) {
|
if(err) {
|
||||||
|
@ -915,7 +915,7 @@ int ewald3_sigma_short(
|
||||||
if(err)
|
if(err)
|
||||||
kahanadd(err + y, err_c + y, cabs(leg * (prefacn / I) * R_pq_pown
|
kahanadd(err + y, err_c + y, cabs(leg * (prefacn / I) * R_pq_pown
|
||||||
* interr[n])); // TODO include also other errors
|
* interr[n])); // TODO include also other errors
|
||||||
complex double thesummand = prefacn * R_pq_pown * leg * cintres[n] * e_beta_Rpq * e_imf * min1pow_m_neg(m);
|
complex double thesummand = prefacn * R_pq_pown * leg * cintres[n] * e_beta_Rpq * e_imf * min1pow(m);
|
||||||
thesummand *= ipow(n * ewald_factor_ipow_l) * ipow(m * ewald_factor_ipow_m);
|
thesummand *= ipow(n * ewald_factor_ipow_l) * ipow(m * ewald_factor_ipow_m);
|
||||||
ckahanadd(target + y, target_c + y, thesummand);
|
ckahanadd(target + y, target_c + y, thesummand);
|
||||||
#ifdef EWALD_AUTO_CUTOFF
|
#ifdef EWALD_AUTO_CUTOFF
|
||||||
|
|
Loading…
Reference in New Issue