diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-07-25 16:22:50 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-07-25 16:22:50 -0400 |
commit | 802b63ddf121b520db7942fe330cce6004fbeb6d (patch) | |
tree | 75bed44fad331cbb220372425a1bc230a972b2f0 /lib/cluster.h | |
parent | 6ba067856523c481c2813f67f2d37414b739e3b1 (diff) | |
download | c++-802b63ddf121b520db7942fe330cce6004fbeb6d.tar.gz c++-802b63ddf121b520db7942fe330cce6004fbeb6d.tar.bz2 c++-802b63ddf121b520db7942fe330cce6004fbeb6d.zip |
got everyone recording data, and fixed huge bug in the updating of ReF and ImF
Diffstat (limited to 'lib/cluster.h')
-rw-r--r-- | lib/cluster.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/cluster.h b/lib/cluster.h index b8c98e5..3261969 100644 --- a/lib/cluster.h +++ b/lib/cluster.h @@ -77,11 +77,11 @@ void flip_cluster(state_t <R_t, X_t> *state, v_t v0, R_t r, gsl_rng *rand) { for (D_t i = 0; i < state->D; i++) { L_t x = (non_ghost / (v_t)pow(state->L, state->D - i - 1)) % state->L; - add(&(state->ReF[i]), -state->precomputed_cos[i], rs_old); - add(&(state->ReF[i]), state->precomputed_cos[i], rs_new); + add(&(state->ReF[i]), -state->precomputed_cos[x], rs_old); + add(&(state->ReF[i]), state->precomputed_cos[x], rs_new); - add(&(state->ImF[i]), -state->precomputed_sin[i], rs_old); - add(&(state->ImF[i]), state->precomputed_sin[i], rs_new); + add(&(state->ImF[i]), -state->precomputed_sin[x], rs_old); + add(&(state->ImF[i]), state->precomputed_sin[x], rs_new); } free_spin (rs_old); |