diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2017-05-25 14:03:21 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2017-05-25 14:03:21 -0400 |
commit | 1a7f1381bc89b66b66600ed534a5e23be08b2344 (patch) | |
tree | a0aee0a738f2c6643b98ca58e126e25f68a118c1 /lib | |
parent | f7a21799194f6626994195302ac95449158bdcd9 (diff) | |
download | c++-1a7f1381bc89b66b66600ed534a5e23be08b2344.tar.gz c++-1a7f1381bc89b66b66600ed534a5e23be08b2344.tar.bz2 c++-1a7f1381bc89b66b66600ed534a5e23be08b2344.zip |
fixed bug in wolff_step that modified the system energy incorrectly
Diffstat (limited to 'lib')
-rw-r--r-- | lib/wolff_tools.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/wolff_tools.c b/lib/wolff_tools.c index 72cf9f7..4fc096e 100644 --- a/lib/wolff_tools.c +++ b/lib/wolff_tools.c @@ -168,7 +168,7 @@ int32_t wolff_step(double T, double H, ising_state_t *s, gsl_rng *r, double *ps) cluster_t *c = flip_cluster(s->g, ps, H, s->spins, r); s->M += 2 * c->nv; - s->H += c->dH; + s->H += 2 * c->dH; int32_t n_flipped = c->nv; |