summaryrefslogtreecommitdiff
path: root/examples/moving_poiseulle_particles_2d_psm_gpu/sim.cpp
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-11-09 14:17:11 +0100
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-11-09 14:17:11 +0100
commitff88ea49eca3961e1aa4194944b93a3bfbf3d3d8 (patch)
tree0e5b061931c5e8526969e9661e3cc1fca53b995f /examples/moving_poiseulle_particles_2d_psm_gpu/sim.cpp
parentc59aeef2e0c86ec3f0f34ce77c205f3ef0b034cc (diff)
downloadlibs-lbm-ff88ea49eca3961e1aa4194944b93a3bfbf3d3d8.tar.gz
Work on masking
Diffstat (limited to 'examples/moving_poiseulle_particles_2d_psm_gpu/sim.cpp')
-rw-r--r--examples/moving_poiseulle_particles_2d_psm_gpu/sim.cpp18
1 files changed, 16 insertions, 2 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();