From a3ad099281e0f608d0bcfda178502fb41acd8c5b Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Fri, 19 Oct 2018 13:31:39 -0400 Subject: removed support for nonzero x --- doc/system.rst | 6 ++---- lib/include/wolff.hpp | 4 ++-- lib/include/wolff/cluster.hpp | 8 ++++---- lib/include/wolff/system.hpp | 4 ++-- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/doc/system.rst b/doc/system.rst index cb78a6d..928d85b 100644 --- a/doc/system.rst +++ b/doc/system.rst @@ -56,7 +56,7 @@ This class and associated member functions are defined in the header files :file The states of the spins and ghost site are initialized using the default constructors for :type:`X_t` and :type:`R_t`, respectively. :any:`nv` and :any:`ne` are taken directly from :any:`G`, after which the ghost site is added to :any:`G`. - .. function:: system::flip_cluster(v_t i0, const R_t& r, std::mt19937& rng, measurement& A, double x = 1.0) + .. function:: system::flip_cluster(v_t i0, const R_t& r, std::mt19937& rng, measurement& A) Performs one Wolff cluster flip to the system. @@ -64,9 +64,8 @@ This class and associated member functions are defined in the header files :file :param const R_t& r: The transformation by which the cluster is flipped. :param std\:\:mt19937& rng: A random number generator. :param measurement& A: Object whose class inherits :class:`measurement` and provides relevant measurement hooks. - :param double x = 1.0: Optional argument. When assigned, changes the bond activation probability to :math:`p=1-xe^{-\beta\Delta\mathcal H}`. - .. function:: system::run_wolff(N_t N, std::function &, v_t)> r_gen, measurement& A, std::mt19937& rng, double x = 1.0) + .. function:: system::run_wolff(N_t N, std::function &, v_t)> r_gen, measurement& A, std::mt19937& rng) Performs :any:`N` Wolff cluster flips to the system. @@ -74,6 +73,5 @@ This class and associated member functions are defined in the header files :file :param std\:\:function &, v_t>)> r_gen: Generator of transformations for the cluster flips. :param measurement& A: Object whose class inherits :class:`measurement` and provides relevant measurement hooks. :param std\:\:mt19937& rng: A random number generator. - :param double x = 1.0: Optional argument. When assigned, changes the bond activation probability to :math:`p=1-xe^{-\beta\Delta\mathcal H}`. diff --git a/lib/include/wolff.hpp b/lib/include/wolff.hpp index 7ad608f..7e909c8 100644 --- a/lib/include/wolff.hpp +++ b/lib/include/wolff.hpp @@ -10,7 +10,7 @@ namespace wolff{ template void system::run_wolff(N_t N, std::function &, v_t)> r_gen, - measurement& A, std::mt19937& rng, double x) { + measurement& A, std::mt19937& rng) { std::uniform_int_distribution dist(0, nv - 1); @@ -20,7 +20,7 @@ void system::run_wolff(N_t N, A.pre_cluster(n, N, *this, i0, r); - this->flip_cluster(i0, r, rng, A, x); + this->flip_cluster(i0, r, rng, A); A.post_cluster(n, N, *this); } diff --git a/lib/include/wolff/cluster.hpp b/lib/include/wolff/cluster.hpp index 34d256a..b66f367 100644 --- a/lib/include/wolff/cluster.hpp +++ b/lib/include/wolff/cluster.hpp @@ -13,7 +13,7 @@ namespace wolff { template void system::flip_cluster(v_t i0, const R_t& r, - std::mt19937& rng, measurement& A, double x) { + std::mt19937& rng, measurement& A) { std::uniform_real_distribution dist(0.0, 1.0); std::queue queue; @@ -69,7 +69,7 @@ void system::flip_cluster(v_t i0, const R_t& r, #endif #ifdef WOLFF_FINITE_STATES - p = 1.0 - x + x * finite_states_Bp[finite_states_enum(s0s_old)] + p = finite_states_Bp[finite_states_enum(s0s_old)] [finite_states_enum(s0s_new)]; #endif @@ -85,7 +85,7 @@ void system::flip_cluster(v_t i0, const R_t& r, #endif #ifdef WOLFF_FINITE_STATES - p = 1.0 - x + x * finite_states_Zp[finite_states_enum(s[i])] + p = finite_states_Zp[finite_states_enum(s[i])] [finite_states_enum(si_new)] [finite_states_enum(s[j])]; #endif @@ -95,7 +95,7 @@ void system::flip_cluster(v_t i0, const R_t& r, } #ifndef FINITE_STATES - p = 1.0 - x * exp(-dE / T); + p = 1.0 - exp(-dE / T); #endif if (dist(rng) < p) { diff --git a/lib/include/wolff/system.hpp b/lib/include/wolff/system.hpp index 6e9c951..32ad38e 100644 --- a/lib/include/wolff/system.hpp +++ b/lib/include/wolff/system.hpp @@ -68,8 +68,8 @@ class system { #endif } - void flip_cluster(v_t, const R_t&, std::mt19937&, measurement&, double x = 1.0); - void run_wolff(N_t, std::function &, v_t)> r_gen, measurement& A, std::mt19937& rng, double x = 1.0); + void flip_cluster(v_t, const R_t&, std::mt19937&, measurement&); + void run_wolff(N_t, std::function &, v_t)> r_gen, measurement& A, std::mt19937& rng); }; } -- cgit v1.2.3-70-g09d2