diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2017-10-16 18:18:55 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2017-10-16 18:18:55 -0400 |
commit | cea2351e7283099ebfd7d9d29688fe6c817bf4b8 (patch) | |
tree | 16c0b0bbc385f83ef93374e44a093e3a278873f1 /lib/wolff.h | |
parent | e0135494451d5026734f6d0df6bdfed50662b93e (diff) | |
download | c++-cea2351e7283099ebfd7d9d29688fe6c817bf4b8.tar.gz c++-cea2351e7283099ebfd7d9d29688fe6c817bf4b8.tar.bz2 c++-cea2351e7283099ebfd7d9d29688fe6c817bf4b8.zip |
added new algorithm methods, specifically metropolis and wolff with a static ghost spin
Diffstat (limited to 'lib/wolff.h')
-rw-r--r-- | lib/wolff.h | 11 |
1 files changed, 9 insertions, 2 deletions
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); |