From db81d74c3959fded1c32fe4e95f2efeed04938ee Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Fri, 31 Oct 2025 14:25:09 +0100 Subject: Adding 3D poiseulle and using http fetching --- lib/c++/collision.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/c++/collision.hpp') diff --git a/lib/c++/collision.hpp b/lib/c++/collision.hpp index 9ab542b..73e86ae 100644 --- a/lib/c++/collision.hpp +++ b/lib/c++/collision.hpp @@ -45,9 +45,9 @@ public: * Raw setup */ template - void apply(saw::data& field, saw::data> index, uint64_t time_step){ - bool is_even = ((time_step % 2) == 0); - auto& cell = field(index); + void apply(saw::data& field, saw::data> index, saw::data time_step){ + bool is_even = ((time_step.get() % 2) == 0); + auto& cell = field.at(index); auto& dfs_old = (is_even) ? cell.template get<"dfs_old">() : cell.template get<"dfs">(); // auto& dfs = (not is_even) ? cell.template get<"dfs_old">() : cell.template get<"dfs">(); @@ -90,8 +90,8 @@ public: static constexpr saw::string_literal before = "streaming"; template - void apply(saw::data& field, saw::data> index, uint64_t time_step){ - bool is_even = ((time_step % 2) == 0); + void apply(saw::data& field, saw::data> index, saw::data time_step){ + bool is_even = ((time_step.get() % 2) == 0); auto& cell = field(index); auto& dfs_old = (is_even) ? cell.template get<"dfs_old">() : cell.template get<"dfs">(); -- cgit v1.2.3