diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-03-26 16:59:43 -0300 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-03-26 16:59:43 -0300 |
commit | 131125bd42b69ba27a2f3ea76534cc3b2348cfb0 (patch) | |
tree | 8dfbf110b882b8be001b760ba3dc9ffe52ffc542 | |
parent | 481f13c6a3cf93e9eded54134a860e715e0eeed5 (diff) | |
download | code-131125bd42b69ba27a2f3ea76534cc3b2348cfb0.tar.gz code-131125bd42b69ba27a2f3ea76534cc3b2348cfb0.tar.bz2 code-131125bd42b69ba27a2f3ea76534cc3b2348cfb0.zip |
Changed correlations code to incorporate individual run IDs.
-rw-r--r-- | correlations.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/correlations.cpp b/correlations.cpp index 930698a..ef0222e 100644 --- a/correlations.cpp +++ b/correlations.cpp @@ -14,10 +14,11 @@ int main(int argc, char* argv[]) { Real Δw = 1e-2; Real T0 = 0; Real T = 100; + std::string id; int opt; - while ((opt = getopt(argc, argv, "N:E:t:w:0:T:")) != -1) { + while ((opt = getopt(argc, argv, "N:E:t:w:0:T:i:")) != -1) { switch (opt) { case 'N': N = (unsigned)atof(optarg); @@ -37,12 +38,15 @@ int main(int argc, char* argv[]) { case 'T': T = atof(optarg); break; + case 'i': + id = optarg; + break; default: exit(1); } } - std::string filebase = std::to_string(N) + "_" + std::to_string(E) + "_" + std::to_string(-std::log10(Δt)) + "_" + std::to_string(Δw); + std::string filebase = std::to_string(N) + "_" + std::to_string(E) + "_" + std::to_string(-std::log10(Δt)) + "_" + std::to_string(Δw) + "_" + id; std::ifstream file(filebase + ".dat", std::ios::binary|std::ios::in|std::ios::ate); |