summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jpk247@cornell.edu>2017-10-19 12:38:50 -0400
committerJaron Kent-Dobias <jpk247@cornell.edu>2017-10-19 12:38:50 -0400
commitc584052a004f6c7a2932b5290f57ea62bb722a26 (patch)
treeeb2a6ed1c796004aae1885a9575bee7a9175f9fe
parentcc9ae4b379e611fb89c91f5ebfc1a794865ffb13 (diff)
downloadc++-c584052a004f6c7a2932b5290f57ea62bb722a26.tar.gz
c++-c584052a004f6c7a2932b5290f57ea62bb722a26.tar.bz2
c++-c584052a004f6c7a2932b5290f57ea62bb722a26.zip
Revert "fixed a mistake in the way wolff cluster tries were counted"
This reverts commit 020266dc3745afc4f9d21a15b40e3a83adbd92ff
-rw-r--r--lib/wolff.h1
-rw-r--r--lib/wolff_tools.c5
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/wolff.h b/lib/wolff.h
index 6b9cceb..84b3d22 100644
--- a/lib/wolff.h
+++ b/lib/wolff.h
@@ -33,7 +33,6 @@ typedef struct {
typedef struct {
uint32_t nv;
- uint32_t nt;
int32_t dJb;
int32_t dHb;
bool hit_ghost;
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);
}