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