summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2019-07-31 16:50:05 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2019-07-31 16:50:05 -0400
commit91bcb56c0cd86002a403671a8dbd74d6d5540028 (patch)
tree779b5585dc11413a035e6e86248c7a5869351b60
parent272627e1e0936e3adfd168e4e6ce31cc8954d719 (diff)
downloadspace_wolff-91bcb56c0cd86002a403671a8dbd74d6d5540028.tar.gz
space_wolff-91bcb56c0cd86002a403671a8dbd74d6d5540028.tar.bz2
space_wolff-91bcb56c0cd86002a403671a8dbd74d6d5540028.zip
made the time multiplier a variable
-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;
}
}