From f8022a6131126bb43a96908933c8fa0f3fc2f009 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Tue, 5 May 2026 09:58:32 +0200 Subject: Forced Particle LBM --- examples/poiseulle_particles_2d_fplbm_gpu/sim.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/poiseulle_particles_2d_fplbm_gpu/sim.cpp b/examples/poiseulle_particles_2d_fplbm_gpu/sim.cpp index 378154c..93d4b46 100644 --- a/examples/poiseulle_particles_2d_fplbm_gpu/sim.cpp +++ b/examples/poiseulle_particles_2d_fplbm_gpu/sim.cpp @@ -44,6 +44,9 @@ using VelChunk = Chunk, 0u, dim_x, dim_y>; template using RhoChunk = Chunk, 0u, dim_x, dim_y>; +template +using ForceChunk = Chunk, 0u, dim_x, dim_y>; + template using MacroStruct = Struct< Member, "velocity">, @@ -112,7 +115,7 @@ saw::error_or setup_initial_conditions( [&](auto& index){ auto& df = df_f.at(index); auto& rho = rho_f.at(index); - por_f.at(index).at({}) = {1}; + por_f.at(index).at({}) = {0}; rho.at({}) = {1}; auto& vel = vel_f.at(index); auto eq = equilibrium(rho,vel); @@ -153,7 +156,7 @@ saw::error_or setup_initial_conditions( auto dist = middle - ind_vec; auto dist_2 = saw::math::dot(dist,dist); if(dist_2.at({}).get() < dim_y*dim_y*0.01){ - porous_f.at(index).at({}) = 0.0; + porous_f.at(index).at({}) = 1.0; } }, {},// 0-index @@ -176,7 +179,7 @@ saw::error_or step( // auto coll_ev = q.submit([&](acpp::sycl::handler& h){ - component> collision{0.65}; + component> collision{0.65}; component> bb; component,encode::Sycl> abb; -- cgit v1.2.3