diff --git a/DLASystem.cpp b/DLASystem.cpp index 41a90a0..fc592a6 100644 --- a/DLASystem.cpp +++ b/DLASystem.cpp @@ -141,6 +141,7 @@ void DLASystem::updateClusterRadius(double pos[]) { } if (killCircle + 2 >= gridSize / 2) { + std::cerr << "Early Exit" << endl; this->running = false; } } @@ -221,6 +222,8 @@ DLASystem::~DLASystem() { delete[] grid[i]; delete[] grid; + csv_out.flush(); + if (csv_out.is_open()) { csv_out.close(); } diff --git a/harness.bash b/harness.bash new file mode 100644 index 0000000..c575f62 --- /dev/null +++ b/harness.bash @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +parallel "../run {1} {2} {3}" ::: {0..10} ::: {0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0} ::: 1000 diff --git a/harness.ts b/harness.ts deleted file mode 100755 index 9de8d02..0000000 --- a/harness.ts +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env -S deno run --allow-env --allow-run - -const execPath = Deno.args[0]; - -function* range(min, max, incr = 1): Generator { - let i = min; - do { - yield i - i += incr; - } while (i < max) -} - -let ps = [] - -for (let seed of range(0, 10)) { - for (let prob of (range(0, 1, 0.05))) { - const p = Deno.run({ - cmd: [execPath, seed, prob, 1000], - }); - - ps.push(p) - } -} - -await Promise.all(ps); diff --git a/mainDLA.cpp b/mainDLA.cpp index aaedfa2..418791e 100644 --- a/mainDLA.cpp +++ b/mainDLA.cpp @@ -29,6 +29,8 @@ Config::Config(int argc, char **argv) { str << "./out-" << seed << '-' << stickProbability << "-" << maxParticles << ".csv"; std::ofstream csv_out(str.str()); this->csv = std::move(csv_out); + + this->csv << "frame" << "," << "x" << "," << "y" << std::endl; } } @@ -47,5 +49,7 @@ int main(int argc, char **argv) { sys->Update(); } + cout << "hey" << endl; + return 0; }