cpp/main.cpp

36 lines
774 B
C++
Raw Normal View History

2024-08-18 11:21:27 +00:00
#include <iostream>
2024-08-16 17:55:27 +00:00
#include <unordered_map>
#include <random>
#include "io.h"
#include "sims.h"
#include "motions/random.h"
2024-08-20 15:51:49 +00:00
#include "motions/tetrahedral.h"
2024-08-16 17:55:27 +00:00
#include "times/delta.h"
2024-08-20 15:51:49 +00:00
int main (const int argc, char *argv[]) {
Arguments args;
try {
args = parse_args(argc, argv);
} catch (std::runtime_error& error) {
std::cerr << error.what() << std::endl;
2024-08-18 11:21:27 +00:00
return 1;
}
2024-08-20 15:51:49 +00:00
std::unordered_map parameter { read_parameter(args.parameter_file) };
2024-08-16 17:55:27 +00:00
std::random_device rd;
std::mt19937_64 rng(rd());
2024-08-20 15:51:49 +00:00
auto motion = TetrahedralJump(rng);
2024-08-16 17:55:27 +00:00
auto dist = DeltaDistribution(rng);
2024-08-20 15:51:49 +00:00
if (args.spectrum) {
run_spectrum(parameter, motion, dist);
}
if (args.ste) {
run_ste(parameter, motion, dist);
}
2024-08-16 17:55:27 +00:00
}