From 91bcb56c0cd86002a403671a8dbd74d6d5540028 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Wed, 31 Jul 2019 16:50:05 -0400 Subject: made the time multiplier a variable --- ising.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ising.cpp b/ising.cpp index e4ab65c..9ca6060 100644 --- a/ising.cpp +++ b/ising.cpp @@ -13,13 +13,14 @@ int main(int argc, char* argv[]) { unsigned L = 32; unsigned N = 1000; unsigned mod = 0; + unsigned multi = 1e4; double T = 2.0 / log(1.0 + sqrt(2.0)); double H = 1.0; double ε = 0.1; int opt; - while ((opt = getopt(argc, argv, "N:L:T:H:e:m:")) != -1) { + while ((opt = getopt(argc, argv, "N:L:T:H:e:m:M")) != -1) { switch (opt) { case 'N': N = (unsigned)atof(optarg); @@ -39,6 +40,9 @@ int main(int argc, char* argv[]) { case 'm': mod = atoi(optarg); break; + case 'M': + multi = atoi(optarg); + break; default: exit(1); } @@ -145,7 +149,7 @@ int main(int argc, char* argv[]) { ising.wolff(T, N, rng); std::array τ = ising.Eq.τ(); std::cout << τ[0] << " " << τ[1] << " " << τ[1] / τ[0] << "\n"; - if (τ[1] / τ[0] < ε && τ[0] * 1e4 < ising.Eq.num_added()) { + if (τ[1] / τ[0] < ε && τ[0] * multi < ising.Eq.num_added()) { break; } } -- cgit v1.2.3-54-g00ecf