From 8c38676379b33ce4e3c80086c6063de12dd1d829 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Thu, 11 Nov 2021 17:13:52 +0100 Subject: New file for stopping at saddles. --- pureStokesFromSaddles.cpp | 54 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 pureStokesFromSaddles.cpp diff --git a/pureStokesFromSaddles.cpp b/pureStokesFromSaddles.cpp new file mode 100644 index 0000000..6516a80 --- /dev/null +++ b/pureStokesFromSaddles.cpp @@ -0,0 +1,54 @@ +#include +#include +#include + +#include "collectStokesData.hpp" + +#include "pcg-cpp/include/pcg_random.hpp" +#include "randutils/randutils.hpp" +#include "unsupported/Eigen/CXX11/src/Tensor/TensorFFT.h" + +#define PSPIN_P 3 +const int p = PSPIN_P; // polynomial degree of Hamiltonian + +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; + + int opt; + + while ((opt = getopt(argc, argv, "N:e:d:n:")) != -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; + default: + exit(1); + } + } + + Rng r; + + for (unsigned i = 0; i < n; i++) { + auto tag = std::chrono::high_resolution_clock::now(); + std::ofstream output("stokes_" + std::to_string(tag.time_since_epoch().count()) + ".dat"); + collectStokesData<3>(output, N, r.engine(), ε, δ, false, 1.0); + } + + return 0; +} -- cgit v1.2.3-70-g09d2