Allow config of parameters from commandline.

This commit is contained in:
Joshua Coles 2023-03-01 21:22:55 +00:00
parent ebb4959d82
commit 1366598409

View File

@ -3,13 +3,18 @@
#include "DLASystem.h" #include "DLASystem.h"
int main(int argc, char **argv) { int main(int argc, char **argv) {
// create the system if (argc != 4) {
auto *sys = new DLASystem(1000, std::string("./out.csv")); cerr << "Usage " << argv[0] << " <seed> <maxParticles> <csvPath>" << endl;
return 1;
// this is the seed for the random numbers }
int seed = 6;
int seed = std::stoi(argv[1]);
int maxParticles = std::stoi(argv[2]);
string csvPath = argv[3];
std::cerr << "Setting seed " << seed << endl; std::cerr << "Setting seed " << seed << endl;
// create the system
auto *sys = new DLASystem(maxParticles, csvPath);
sys->setSeed(seed); sys->setSeed(seed);
sys->running = true; sys->running = true;