From 03bcbc83d1b6d45c4ccd65e8b0b54e49d12ba2c9 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Thu, 5 Feb 2026 19:01:53 +0100 Subject: Adding lambda for timesteps management and reduced dimensions --- examples/poiseulle_particles_2d_gpu/sim.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'examples/poiseulle_particles_2d_gpu/sim.cpp') diff --git a/examples/poiseulle_particles_2d_gpu/sim.cpp b/examples/poiseulle_particles_2d_gpu/sim.cpp index 305ef80..f9ee85b 100644 --- a/examples/poiseulle_particles_2d_gpu/sim.cpp +++ b/examples/poiseulle_particles_2d_gpu/sim.cpp @@ -7,8 +7,8 @@ namespace kel { namespace lbm { -constexpr uint64_t dim_x = 2048u; -constexpr uint64_t dim_y = 1024u; +constexpr uint64_t dim_x = 1024u; +constexpr uint64_t dim_y = 512u; namespace sch { using namespace saw::schema; @@ -119,7 +119,15 @@ saw::error_or step( // Need nicer things to handle the flow. I see improvement here component> collision{0.6}; component> bb; - component,encode::Sycl> flow_in{1.01}; + component,encode::Sycl> flow_in{ + [&](){ + uint64_t target_t_i = 128u; + if(t_i.get() < target_t_i){ + return 1.0 + (0.001 / target_t_i) * t_i.get(); + } + return 1.001; + }() + }; component,encode::Sycl> flow_out{1.0}; h.parallel_for(acpp::sycl::range{dim_x,dim_y}, [=](acpp::sycl::id idx){ @@ -236,7 +244,7 @@ saw::error_or lbm_main(int argc, char** argv){ } } sycl_q.wait(); - saw::data time_steps{256ul}; + saw::data time_steps{512ul}; for(saw::data i{0u}; i < time_steps; ++i){ { -- cgit v1.2.3