From 0d3c1a0f68792a04129dc8da8e9b9b113f76e3ec Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Mon, 23 Mar 2026 16:41:32 +0100 Subject: Found wrong zou he boundary issue. Preparing for fix --- examples/poiseulle_particles_2d_psm_gpu/sim.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'examples/poiseulle_particles_2d_psm_gpu/sim.cpp') diff --git a/examples/poiseulle_particles_2d_psm_gpu/sim.cpp b/examples/poiseulle_particles_2d_psm_gpu/sim.cpp index a8aeabb..0d356dd 100644 --- a/examples/poiseulle_particles_2d_psm_gpu/sim.cpp +++ b/examples/poiseulle_particles_2d_psm_gpu/sim.cpp @@ -202,7 +202,7 @@ saw::error_or step( q.submit([&](acpp::sycl::handler& h){ - component> collision{0.65}; + component> collision{0.8}; component> bb; component,encode::Sycl> abb; @@ -243,13 +243,13 @@ saw::error_or step( collision.apply(fields,macros,index,t_i); break; case 3u: - //flow_in.apply(fields,index,t_i); - equi.apply(fields,index,t_i); + flow_in.apply(fields,index,t_i); + //equi.apply(fields,index,t_i); collision.apply(fields,macros,index,t_i); break; case 4u: - // flow_out.apply(fields,index,t_i); - equi.apply(fields,index,t_i); + flow_out.apply(fields,index,t_i); + // equi.apply(fields,index,t_i); collision.apply(fields,macros,index,t_i); break; default: @@ -295,12 +295,12 @@ saw::error_or lbm_main(int argc, char** argv){ converter conv { // delta_x - {{1.0}}, + {{1e-3}}, // delta_t - {{1.0}} + {{1e-06}} }; - print_lbm_meta(conv,{0.05},{0.01},{0.4 * dim_y}); + print_lbm_meta(conv,{0.1},{1e-2},{0.4 * dim_y *1e-3}); // saw::data> meta{{dim_x,dim_y}}; auto lbm_data_ptr = saw::heap>>(); @@ -382,8 +382,7 @@ saw::error_or lbm_main(int argc, char** argv){ } } sycl_q.wait(); - /* - { + if(i.get() % 1 == 0u){ { auto eov = dev.copy_to_host(lbm_sycl_macro_data,*lbm_macro_data_ptr); if(eov.is_error()){ @@ -397,7 +396,6 @@ saw::error_or lbm_main(int argc, char** argv){ } } } - */ /* { { -- cgit v1.2.3 From 571e79c4d0b72202186fd11314cf268723b1844d Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Mon, 23 Mar 2026 17:33:05 +0100 Subject: Fixed boundary setting --- examples/poiseulle_particles_2d_psm_gpu/sim.cpp | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'examples/poiseulle_particles_2d_psm_gpu/sim.cpp') diff --git a/examples/poiseulle_particles_2d_psm_gpu/sim.cpp b/examples/poiseulle_particles_2d_psm_gpu/sim.cpp index 0d356dd..7702808 100644 --- a/examples/poiseulle_particles_2d_psm_gpu/sim.cpp +++ b/examples/poiseulle_particles_2d_psm_gpu/sim.cpp @@ -83,7 +83,24 @@ saw::error_or setup_initial_conditions( info_f.get_dims(), {{1u,1u}} ); - + // Corners + /// Inflow + iterator::apply( + [&](auto& index){ + info_f.at(index).set(5u); + }, + {{0u,0u}}, + {{1u,dim_y}} + ); + /// Outflow + iterator::apply( + [&](auto& index){ + info_f.at(index).set(5u); + }, + {{dim_x-1u,0u}}, + {{dim_x, dim_y}} + ); + // Overwrite with // Inflow iterator::apply( [&](auto& index){ @@ -251,7 +268,11 @@ saw::error_or step( flow_out.apply(fields,index,t_i); // equi.apply(fields,index,t_i); collision.apply(fields,macros,index,t_i); - break; + break; + case 5u: + // Corners + bb.apply(fields,index,t_i); + break; default: break; } -- cgit v1.2.3