summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ising.cpp8
1 files 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<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;
}
}