From cea2351e7283099ebfd7d9d29688fe6c817bf4b8 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Mon, 16 Oct 2017 18:18:55 -0400 Subject: added new algorithm methods, specifically metropolis and wolff with a static ghost spin --- lib/wolff.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'lib/wolff.h') diff --git a/lib/wolff.h b/lib/wolff.h index 82ccb9e..bd49bf0 100644 --- a/lib/wolff.h +++ b/lib/wolff.h @@ -18,6 +18,12 @@ #include "queue.h" +typedef enum { + WOLFF, + WOLFF_GHOST, + METROPOLIS +} sim_t; + typedef struct { graph_t *g; bool *spins; @@ -29,6 +35,7 @@ typedef struct { uint32_t nv; int32_t dJb; int32_t dHb; + bool hit_ghost; } cluster_t; typedef struct { @@ -44,12 +51,12 @@ typedef struct { int32_t sign(double x); -cluster_t *flip_cluster(const graph_t *g, const double *ps, bool *x, +cluster_t *flip_cluster(const graph_t *g, const double *ps, bool *x, bool stop_on_ghost, gsl_rng *r); graph_t *graph_add_ext(const graph_t *g); -uint32_t wolff_step(double T, double H, ising_state_t *s, gsl_rng *r, +uint32_t wolff_step(double T, double H, ising_state_t *s, sim_t sim, gsl_rng *r, double *ps); void update_meas(meas_t *m, double x); -- cgit v1.2.3-70-g09d2