set parameters to dt 0.01

This commit is contained in:
lbaumberger
2026-04-27 14:23:13 +02:00
parent a926a9a815
commit 1b79bd15f4
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -67,7 +67,7 @@ int main(int argc, const char *argv[]) {
int n_iter = atoi(argv[2]);
// Logic to get/dump the simulation data
const int dump_interval = 50; // dump every 5 iterations -> 20 fps (since dt = 0.01)
const int dump_interval = 5; // dump every 5 iterations -> 20 fps (since dt = 0.01)
const char *dump_path = (argc >= 4) ? argv[3] : nullptr;
std::vector<std::tuple<int, int, double, double, int>> samples; // t, id, x, y, color
@@ -117,11 +117,11 @@ int main(int argc, const char *argv[]) {
if (p.color == WHITE && p.curr_pos.x > (BOARD_LENGTH - 1.5)) {
// basically just keep the y position and reset the x
p.curr_pos.x = 1.0;
// p.destination.y = p.curr_pos.y;
p.destination.y = p.curr_pos.y;
}
if (p.color == BLACK && p.curr_pos.x < 1.5) {
p.curr_pos.x = BOARD_LENGTH - 1.0;
// p.destination.y = p.curr_pos.y;
p.destination.y = p.curr_pos.y;
}
// # 10 flops = 5 ADDs, 2 DIVs, 1 SQRT, 2 MULTs