diff --git a/DLASystem.cpp b/DLASystem.cpp index 78b51c9..e1018b6 100644 --- a/DLASystem.cpp +++ b/DLASystem.cpp @@ -172,10 +172,6 @@ void DLASystem::moveLastParticle() { setParticleInactive(); // make the particle inactive (stuck) updateClusterRadius(lastP->pos); // update the cluster radius, addCircle, etc. } - } else { - // If we get to here then we are trying to move to an occupied site - cout << "reject " << direction << endl - << lastP->pos[0] << "," << lastP->pos[1] << endl; } } diff --git a/mainDLA.cpp b/mainDLA.cpp index 9e7437f..8839ba2 100644 --- a/mainDLA.cpp +++ b/mainDLA.cpp @@ -13,14 +13,24 @@ using std::endl; DLASystem *sys; int main(int argc, char **argv) { - std::ofstream csv_out("./out.csv"); + int seed; + double stickProbability = 0.5; + + if (argc != 3) { + return 1; + } else { + seed = std::stoi(argv[1]); + stickProbability = std::stod(argv[2]); + } + + cout << "Seed: " << seed << "Stick P: " << stickProbability << endl; + + std::stringstream str; + str << "./out-" << seed << '-' << stickProbability << ".csv"; + std::ofstream csv_out(str.str()); // create the system - sys = new DLASystem(std::move(csv_out), 0.5); - - // this is the seed for the random numbers - int seed = 6; - cout << "setting seed " << seed << endl; + sys = new DLASystem(std::move(csv_out), stickProbability); sys->setSeed(seed); sys->setRunning();