diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-07-31 16:50:05 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-07-31 16:50:05 -0400 |
commit | 91bcb56c0cd86002a403671a8dbd74d6d5540028 (patch) | |
tree | 779b5585dc11413a035e6e86248c7a5869351b60 | |
parent | 272627e1e0936e3adfd168e4e6ce31cc8954d719 (diff) | |
download | space_wolff-91bcb56c0cd86002a403671a8dbd74d6d5540028.tar.gz space_wolff-91bcb56c0cd86002a403671a8dbd74d6d5540028.tar.bz2 space_wolff-91bcb56c0cd86002a403671a8dbd74d6d5540028.zip |
made the time multiplier a variable
-rw-r--r-- | ising.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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<double, 2> τ = 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; } } |