diff options
-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; } } |