summaryrefslogtreecommitdiff
path: root/lib/cluster.h
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-25 16:22:50 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-25 16:22:50 -0400
commit802b63ddf121b520db7942fe330cce6004fbeb6d (patch)
tree75bed44fad331cbb220372425a1bc230a972b2f0 /lib/cluster.h
parent6ba067856523c481c2813f67f2d37414b739e3b1 (diff)
downloadc++-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.h8
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);