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 --- src/wolff_clock.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/wolff_clock.cpp') diff --git a/src/wolff_clock.cpp b/src/wolff_clock.cpp index e186c44..86badfe 100644 --- a/src/wolff_clock.cpp +++ b/src/wolff_clock.cpp @@ -107,7 +107,7 @@ int main(int argc, char *argv[]) { if (!draw) { // a very simple example: measure the average magnetization measurement = [&] (const sim_t *s) { - average_M += (double)s->M[0] / (double)N / (double)s->nv; + average_M += (double)s->M.x[0] / (double)N / (double)s->nv; }; } else { // a more complex example: measure the average magnetization, and draw the spin configuration to the screen @@ -124,7 +124,7 @@ int main(int argc, char *argv[]) { gluOrtho2D(0.0, L, 0.0, L); measurement = [&] (const sim_t *s) { - average_M += (double)s->M[0] / (double)N / (double)s->nv; + average_M += (double)s->M.x[0] / (double)N / (double)s->nv; glClear(GL_COLOR_BUFFER_BIT); for (v_t i = 0; i < pow(L, 2); i++) { potts_t tmp_s = act_inverse(s->R, s->spins[i]); -- cgit v1.2.3-70-g09d2