From c9cb8dd499c2b2648a78e63f2a0810451a69f8fd Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Fri, 12 Nov 2021 16:41:14 +0100 Subject: Some tweaking of the Stokes finder, how the lines are recorded, and fewer executables. --- mixedStokes.cpp | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 mixedStokes.cpp (limited to 'mixedStokes.cpp') diff --git a/mixedStokes.cpp b/mixedStokes.cpp new file mode 100644 index 0000000..09a75b2 --- /dev/null +++ b/mixedStokes.cpp @@ -0,0 +1,52 @@ +#include +#include + +#include "collectStokesData.hpp" + +#include "pcg-cpp/include/pcg_random.hpp" +#include "randutils/randutils.hpp" + +using Rng = randutils::random_generator; + +int main(int argc, char* argv[]) { + // model parameters + unsigned N = 10; // number of spins + // simulation parameters + Real ε = 1e-15; + Real δ = 1; + unsigned n = 10; + bool useMinima = false; + + int opt; + + while ((opt = getopt(argc, argv, "N:e:d:n:m")) != -1) { + switch (opt) { + case 'N': + N = (unsigned)atof(optarg); + break; + case 'e': + ε = atof(optarg); + break; + case 'd': + δ = atof(optarg); + break; + case 'n': + n = atof(optarg); + break; + case 'm': + useMinima = true; + break; + default: + exit(1); + } + } + + Rng r; + + for (unsigned i = 0; i < n; i++) { + auto tag = std::chrono::high_resolution_clock::now(); + collectStokesData<2, 4>(std::to_string(tag.time_since_epoch().count()), N, r.engine(), ε, δ, useMinima, 1.0, 0.01); + } + + return 0; +} -- cgit v1.2.3-54-g00ecf