-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
66 lines (52 loc) · 1.95 KB
/
main.cpp
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Copyright 2021 Joren Brunekreef, Daniel Nemeth and Andrzej Görlich
#include "config.hpp"
#include "universe.hpp"
#include "simulation.hpp"
#include "observables/volume_profile.hpp"
#include "observables/ricci2d.hpp"
std::default_random_engine rng(1);
int main(int argc, const char * argv[]) {
std::string fname;
if (argc > 1) {
fname = std::string(argv[1]);
printf("%s\n", fname.c_str());
}
ConfigReader cfr;
cfr.read(fname);
double k0 = cfr.getDouble("k0");
double k3_s = cfr.getDouble("k3");
int genus = cfr.getInt("genus");
int targetVolume = cfr.getInt("targetvolume");
int target2Volume = cfr.getInt("target2volume");
int volfixSwitch = cfr.getInt("volfixswitch");
int seed = cfr.getInt("seed");
std::string outputDir = cfr.getString("outputdir");
std::string fID = cfr.getString("fileid");
int thermalSweeps = cfr.getInt("thermalsweeps"); // Number of thermalization sweeps
int sweeps = cfr.getInt("measuresweeps"); // Number of measurement sweeps
int kSteps = cfr.getInt("ksteps");
int strictness = cfr.getInt("strictness");
int v1 = cfr.getInt("v1");
int v2 = cfr.getInt("v2");
int v3 = cfr.getInt("v3");
std::string inFile = cfr.getString("infile");
std::string outFile = cfr.getString("outfile");
printf("fID: %s\n", fID.c_str());
printf("seed: %d\n", seed);
printf("strictness: %d\n", strictness);
Observable::data_dir = outputDir;
Universe::initialize(inFile, fID, strictness, volfixSwitch);
printf("\n\n#######################\n");
printf("* * * Initialized * * *\n");
printf("#######################\n\n");
VolumeProfile vp3(fID);
Simulation::addObservable3d(vp3);
Ricci2d ricci2d(fID);
Simulation::addObservable2d(ricci2d);
Simulation::start(k0, k3_s, sweeps, thermalSweeps, kSteps, targetVolume, target2Volume, seed, outFile, v1, v2, v3);
printf("\n\n####################\n");
printf("* * * Finished * * *\n");
printf("####################\n\n");
printf("t31: %d\n", Universe::tetras31.size());
return 0;
}