Allow config of parameters from commandline.
This commit is contained in:
parent
ebb4959d82
commit
1366598409
15
mainDLA.cpp
15
mainDLA.cpp
@ -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;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user