diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-11-09 14:17:11 +0100 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-11-09 14:17:11 +0100 |
| commit | ff88ea49eca3961e1aa4194944b93a3bfbf3d3d8 (patch) | |
| tree | 0e5b061931c5e8526969e9661e3cc1fca53b995f /examples | |
| parent | c59aeef2e0c86ec3f0f34ce77c205f3ef0b034cc (diff) | |
| download | libs-lbm-ff88ea49eca3961e1aa4194944b93a3bfbf3d3d8.tar.gz | |
Work on masking
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/moving_poiseulle_particles_2d_psm_gpu/sim.cpp | 18 | ||||
| -rw-r--r-- | examples/stokes_drag_particle_2d_hlbm_gpu/sim.cpp | 2 | ||||
| -rw-r--r-- | examples/stokes_drag_particle_2d_psm_gpu/sim.cpp | 2 |
3 files changed, 17 insertions, 5 deletions
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<void> step( }).wait(); q.submit([&](acpp::sycl::handler& h){ - component<T,Desc,cmpt::PsmOneParticle,encode::Sycl<kel::lbm::enc::Native>> psm_one_part; + /** + * Split so contact sits between the fluid gather and the integration: + * reset -> fluid gather -> contact -> integrate. + */ + component<T,Desc,cmpt::ParticleForceReset,encode::Sycl<kel::lbm::enc::Native>> p_reset; + component<T,Desc,cmpt::PsmOneParticleGather,encode::Sycl<kel::lbm::enc::Native>> p_gather; + component<T,Desc,cmpt::ParticleIntegrate,encode::Sycl<kel::lbm::enc::Native>> p_integrate; + + // Soft shell against neighbours and against the domain walls. + dem_params<T> p_dem{1.0e-2, 0.3, 0.0, 0.0}; + kel::lbm::data<sch::FixedArray<sch::UInt64,Desc::D>> p_extent{{dim_x,dim_y}}; + component<T,Desc,cmpt::ParticleContact,encode::Sycl<kel::lbm::enc::Native>> p_contact{p_dem,p_extent}; h.parallel_for(acpp::sycl::range<1u>{particle_amount}, [=](acpp::sycl::id<1u> idx){ kel::lbm::data<sch::FixedArray<sch::UInt64,1u>> index; @@ -192,7 +203,10 @@ kel::lbm::error_or<void> 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<void> step( q.submit([&](acpp::sycl::handler& h){ component<T,Desc,cmpt::BGK, encode::Sycl<kel::lbm::enc::Native>> bgk{0.8}; component<T,Desc,cmpt::Hlbm,encode::Sycl<kel::lbm::enc::Native>> collision{0.8}; - component<T,Desc,cmpt::HlbmOneParticle,encode::Sycl<kel::lbm::enc::Native>> one_part_moment; component<T,Desc,cmpt::BounceBack,encode::Sycl<kel::lbm::enc::Native>> bb; component<T,Desc,cmpt::AntiBounceBack<0u>,encode::Sycl<kel::lbm::enc::Native>> abb; @@ -241,7 +240,6 @@ kel::lbm::error_or<void> 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<void> step( q.submit([&](acpp::sycl::handler& h){ component<T,Desc,cmpt::BGK, encode::Sycl<kel::lbm::enc::Native>> bgk{0.8}; - component<T,Desc,cmpt::PSM,encode::Sycl<kel::lbm::enc::Native>> collision{0.8}; + component<T,Desc,cmpt::Psm,encode::Sycl<kel::lbm::enc::Native>> collision{0.8}; component<T,Desc,cmpt::BounceBack,encode::Sycl<kel::lbm::enc::Native>> bb; component<T,Desc,cmpt::AntiBounceBack<0u>,encode::Sycl<kel::lbm::enc::Native>> abb; |
