diff options
Diffstat (limited to 'examples/moving_poiseulle_particles_2d_psm_gpu/sim.cpp')
| -rw-r--r-- | examples/moving_poiseulle_particles_2d_psm_gpu/sim.cpp | 18 |
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(); |
