blob: a437ff3744d830173846f68bfca9db0602ad2824 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#include <getopt.h>
#include <chrono>
#include "collectStokesData.hpp"
#include "pcg-cpp/include/pcg_random.hpp"
#include "randutils/randutils.hpp"
using Rng = randutils::random_generator<pcg32>;
int main(int argc, char* argv[]) {
// model parameters
unsigned N = 10; // number of spins
// simulation parameters
Real ε = 1e-15;
Real δz₀ = 1e-3;
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':
δz₀ = 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(), ε, δz₀, useMinima, 1.0, 0.01);
}
return 0;
}
|