From 803bf67093d621509d4d8d4af326fa2c66c299bc Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Sat, 4 Jul 2026 21:58:38 +0200 Subject: Dangling changes --- examples/stokes_drag_particle_2d_bgk_gpu/sim.cpp | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'examples/stokes_drag_particle_2d_bgk_gpu') diff --git a/examples/stokes_drag_particle_2d_bgk_gpu/sim.cpp b/examples/stokes_drag_particle_2d_bgk_gpu/sim.cpp index 911d84a..9426371 100644 --- a/examples/stokes_drag_particle_2d_bgk_gpu/sim.cpp +++ b/examples/stokes_drag_particle_2d_bgk_gpu/sim.cpp @@ -10,8 +10,8 @@ namespace kel { namespace lbm { -constexpr uint64_t dim_y = 256ul; -constexpr uint64_t dim_x = dim_y * 20ul; +constexpr uint64_t dim_y = 1024ul; +constexpr uint64_t dim_x = dim_y * 2ul; constexpr uint64_t particle_amount = 1ul; @@ -50,8 +50,7 @@ using ForceChunk = Chunk, 0u, dim_x, dim_y>; template using MacroStruct = Struct< Member, "velocity">, - Member, "density">, - Member, "porosity"> + Member, "density"> >; //template @@ -66,7 +65,6 @@ saw::error_or setup_initial_conditions( saw::data>& macros ){ auto& info_f = fields.template get<"info">(); - auto& porous_f = macros.template get<"porosity">(); // Set everything as walls iterator::apply( [&](auto& index){ @@ -109,13 +107,11 @@ saw::error_or setup_initial_conditions( auto& df_f = fields.template get<"dfs_old">(); auto& rho_f = macros.template get<"density">(); auto& vel_f = macros.template get<"velocity">(); - auto& por_f = macros.template get<"porosity">(); iterator::apply( [&](auto& index){ auto& df = df_f.at(index); auto& rho = rho_f.at(index); - por_f.at(index).at({}) = {0}; rho.at({}) = {1}; auto& vel = vel_f.at(index); auto eq = equilibrium(rho,vel); @@ -144,11 +140,10 @@ saw::error_or setup_initial_conditions( {{1u,1u}} ); - /* iterator::apply( [&](auto& index){ saw::data> middle, ind_vec; - middle.at({{0u}}) = dim_x * 0.25; + middle.at({{0u}}) = dim_x * 0.5; middle.at({{1u}}) = dim_y * 0.5; ind_vec.at({{0u}}) = index.at({{0u}}).template cast_to(); @@ -156,14 +151,13 @@ 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({}) = 1.0; + if(dist_2.at({}).get() < dim_y*dim_y*0.01 / 16.0){ + info_f.at(index).set(5u); } }, {},// 0-index df_f.get_dims() ); - */ return saw::make_void(); } @@ -177,7 +171,6 @@ saw::error_or step( ){ auto& q = dev.get_handle(); auto& info_f = fields.template get<"info">(); - auto& porous_f = macros.template get<"porosity">(); // auto coll_ev = q.submit([&](acpp::sycl::handler& h){ @@ -192,7 +185,7 @@ saw::error_or step( rad.at({}).set(dim_y*0.1); saw::data> p_pos; { - p_pos.at({{0u}}) = dim_x * 0.25; + p_pos.at({{0u}}) = dim_x * 0.5; p_pos.at({{1u}}) = dim_y * 0.5; } component> opa{p_pos,rad,eps}; -- cgit v1.2.3