From ff88ea49eca3961e1aa4194944b93a3bfbf3d3d8 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Mon, 9 Nov 2026 14:17:11 +0100 Subject: Work on masking --- examples/moving_poiseulle_particles_2d_psm_gpu/sim.cpp | 18 ++++++++++++++++-- examples/stokes_drag_particle_2d_hlbm_gpu/sim.cpp | 2 -- examples/stokes_drag_particle_2d_psm_gpu/sim.cpp | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/moving_poiseulle_particles_2d_psm_gpu/sim.cpp b/examples/moving_poiseulle_particles_2d_psm_gpu/sim.cpp index 947407e..a27c402 100644 --- a/examples/moving_poiseulle_particles_2d_psm_gpu/sim.cpp +++ b/examples/moving_poiseulle_particles_2d_psm_gpu/sim.cpp @@ -184,7 +184,18 @@ kel::lbm::error_or step( }).wait(); q.submit([&](acpp::sycl::handler& h){ - component> psm_one_part; + /** + * Split so contact sits between the fluid gather and the integration: + * reset -> fluid gather -> contact -> integrate. + */ + component> p_reset; + component> p_gather; + component> p_integrate; + + // Soft shell against neighbours and against the domain walls. + dem_params p_dem{1.0e-2, 0.3, 0.0, 0.0}; + kel::lbm::data> p_extent{{dim_x,dim_y}}; + component> p_contact{p_dem,p_extent}; h.parallel_for(acpp::sycl::range<1u>{particle_amount}, [=](acpp::sycl::id<1u> idx){ kel::lbm::data> index; @@ -192,7 +203,10 @@ kel::lbm::error_or step( index.at({{i}}).set(idx[i]); } - psm_one_part.apply(fields,macros,particles,index,t_i,{16u}); + p_reset.apply(particles,index,t_i); + p_gather.apply(fields,macros,particles,index,t_i,{16u}); + p_contact.apply(particles,index,t_i,{16u}); + p_integrate.apply(particles,index,t_i,{16u}); }); }).wait(); diff --git a/examples/stokes_drag_particle_2d_hlbm_gpu/sim.cpp b/examples/stokes_drag_particle_2d_hlbm_gpu/sim.cpp index 0fe76cb..8117b19 100644 --- a/examples/stokes_drag_particle_2d_hlbm_gpu/sim.cpp +++ b/examples/stokes_drag_particle_2d_hlbm_gpu/sim.cpp @@ -194,7 +194,6 @@ kel::lbm::error_or step( q.submit([&](acpp::sycl::handler& h){ component> bgk{0.8}; component> collision{0.8}; - component> one_part_moment; component> bb; component,encode::Sycl> abb; @@ -241,7 +240,6 @@ kel::lbm::error_or step( break; case 2u: opa.apply(macros,index,t_i); - one_part_moment.apply(fields,macros,index,t_i); collision.apply(fields,macros,index,t_i); fg.apply(fields,macros,index,t_i); break; diff --git a/examples/stokes_drag_particle_2d_psm_gpu/sim.cpp b/examples/stokes_drag_particle_2d_psm_gpu/sim.cpp index 652309c..49a6128 100644 --- a/examples/stokes_drag_particle_2d_psm_gpu/sim.cpp +++ b/examples/stokes_drag_particle_2d_psm_gpu/sim.cpp @@ -174,7 +174,7 @@ kel::lbm::error_or step( q.submit([&](acpp::sycl::handler& h){ component> bgk{0.8}; - component> collision{0.8}; + component> collision{0.8}; component> bb; component,encode::Sycl> abb; -- cgit v1.3.1