From 802b63ddf121b520db7942fe330cce6004fbeb6d Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Wed, 25 Jul 2018 16:22:50 -0400 Subject: got everyone recording data, and fixed huge bug in the updating of ReF and ImF --- lib/cluster.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/cluster.h') 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 *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); -- cgit v1.2.3-70-g09d2