summaryrefslogtreecommitdiff
path: root/lib/wolff_tools.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/wolff_tools.c')
-rw-r--r--lib/wolff_tools.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/wolff_tools.c b/lib/wolff_tools.c
index 629da4e..bab0908 100644
--- a/lib/wolff_tools.c
+++ b/lib/wolff_tools.c
@@ -113,7 +113,6 @@ cluster_t *flip_cluster(const graph_t *g, const double *ps, bool *x, bool stop_o
if (x[vn] ==
x0) { // if the neighboring site matches the flipping cluster...
(*bond_counter)++;
- c->nt++;
if (gsl_rng_uniform(r) < prob) { // and with probability ps[e]...
if (is_ext && stop_on_ghost) {
@@ -193,7 +192,7 @@ uint32_t wolff_step(double T, double H, ising_state_t *s, sim_t sim, gsl_rng *r,
cluster_t *c = flip_cluster(s->g, ps, s->spins, false, r);
s->M += - sign(H) * 2 * c->dHb;
s->H += 2 * (c->dJb + sign (H) * H * c->dHb);
- n_flips = c->nt;
+ n_flips = c->nv;
free(c);
}
@@ -214,7 +213,7 @@ uint32_t wolff_step(double T, double H, ising_state_t *s, sim_t sim, gsl_rng *r,
s->H += 2 * (c->dJb + sign (H) * H * c->dHb);
}
- n_flips = c->nt;
+ n_flips = c->nv;
free(c);
}