diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-10-19 16:31:10 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-10-19 16:31:10 -0400 |
commit | 3c2ce3017120f9469a1fef83096307fc4cef43e2 (patch) | |
tree | 967a08e6b0ae8b95536c73b2b53d8f331a6bc582 /lib/include/wolff/cluster.hpp | |
parent | 3fe64420f18718e585cb36f4331edbf74a3d480e (diff) | |
download | c++-3c2ce3017120f9469a1fef83096307fc4cef43e2.tar.gz c++-3c2ce3017120f9469a1fef83096307fc4cef43e2.tar.bz2 c++-3c2ce3017120f9469a1fef83096307fc4cef43e2.zip |
changed the way that the finite states system works
Diffstat (limited to 'lib/include/wolff/cluster.hpp')
-rw-r--r-- | lib/include/wolff/cluster.hpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/include/wolff/cluster.hpp b/lib/include/wolff/cluster.hpp index b66f367..3912446 100644 --- a/lib/include/wolff/cluster.hpp +++ b/lib/include/wolff/cluster.hpp @@ -68,9 +68,8 @@ void system<R_t, X_t>::flip_cluster(v_t i0, const R_t& r, dE = B(s0s_old) - B(s0s_new); #endif -#ifdef WOLFF_FINITE_STATES - p = finite_states_Bp[finite_states_enum(s0s_old)] - [finite_states_enum(s0s_new)]; +#ifdef WOLFF_USE_FINITE_STATES + p = Bp[s0s_old.enumerate()][s0s_new.enumerate()]; #endif // run measurement hooks for encountering a ghost bond @@ -84,17 +83,15 @@ void system<R_t, X_t>::flip_cluster(v_t i0, const R_t& r, dE = Z(s[i], s[j]) - Z(si_new, s[j]); #endif -#ifdef WOLFF_FINITE_STATES - p = finite_states_Zp[finite_states_enum(s[i])] - [finite_states_enum(si_new)] - [finite_states_enum(s[j])]; +#ifdef WOLFF_USE_FINITE_STATES + p = Zp[s[i].enumerate()][si_new.enumerate()][s[j].enumerate()]; #endif // run measurement hooks for encountering a plain bond A.plain_bond_visited(*this, i, si_new, j, dE); } -#ifndef FINITE_STATES +#ifndef WOLFF_USE_FINITE_STATES p = 1.0 - exp(-dE / T); #endif |