diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-07-23 13:51:13 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-07-23 13:51:13 -0400 |
commit | 639552a2649139ba14363f30daa20786532b21b0 (patch) | |
tree | 624ef3537222183d5474d3a2d05a8bf09611d330 /lib/wolff.h | |
parent | dd2c47db3512658858685c83dd772603203aaab1 (diff) | |
download | c++-639552a2649139ba14363f30daa20786532b21b0.tar.gz c++-639552a2649139ba14363f30daa20786532b21b0.tar.bz2 c++-639552a2649139ba14363f30daa20786532b21b0.zip |
implemented the discrete gaussian model for roughening
Diffstat (limited to 'lib/wolff.h')
-rw-r--r-- | lib/wolff.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/wolff.h b/lib/wolff.h index 4e93d01..8286024 100644 --- a/lib/wolff.h +++ b/lib/wolff.h @@ -3,14 +3,14 @@ #include "state.h" template <class R_t, class X_t> -void wolff(count_t N, state_t <R_t, X_t> *s, std::function <R_t(gsl_rng *, const state_t <R_t, X_t> *)> gen_R, std::function <void(const state_t <R_t, X_t> *)> measurements, gsl_rng *r, bool silent) { +void wolff(count_t N, state_t <R_t, X_t> *s, std::function <R_t(gsl_rng *, X_t s0)> gen_R, std::function <void(const state_t <R_t, X_t> *)> measurements, gsl_rng *r, bool silent) { if (!silent) printf("\n"); for (count_t steps = 0; steps < N; steps++) { if (!silent) printf("\033[F\033[JWOLFF: step %" PRIu64 " / %" PRIu64 ": E = %.2f, S = %" PRIv "\n", steps, N, s->E, s->last_cluster_size); v_t v0 = gsl_rng_uniform_int(r, s->nv); - R_t step = gen_R(r, s); + R_t step = gen_R(r, s->spins[v0]); flip_cluster <R_t, X_t> (s, v0, step, r); free_spin(step); |