diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-05-05 09:58:32 +0200 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-05-05 20:47:42 +0200 |
| commit | f8022a6131126bb43a96908933c8fa0f3fc2f009 (patch) | |
| tree | f568027ea949b8a6e32e46246ea7d67f5e830a81 /examples | |
| parent | 8ed93f1768c313288eb43afd8aa2f1671a6bc7d8 (diff) | |
| download | libs-lbm-f8022a6131126bb43a96908933c8fa0f3fc2f009.tar.gz | |
Forced Particle LBM
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/poiseulle_particles_2d_fplbm_gpu/sim.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/examples/poiseulle_particles_2d_fplbm_gpu/sim.cpp b/examples/poiseulle_particles_2d_fplbm_gpu/sim.cpp index 378154c..93d4b46 100644 --- a/examples/poiseulle_particles_2d_fplbm_gpu/sim.cpp +++ b/examples/poiseulle_particles_2d_fplbm_gpu/sim.cpp @@ -45,6 +45,9 @@ template<typename T> using RhoChunk = Chunk<Scalar<T>, 0u, dim_x, dim_y>; template<typename T, typename Desc> +using ForceChunk = Chunk<Vector<T,Desc::D>, 0u, dim_x, dim_y>; + +template<typename T, typename Desc> using MacroStruct = Struct< Member<VelChunk<T,Desc>, "velocity">, Member<RhoChunk<T>, "density">, @@ -112,7 +115,7 @@ saw::error_or<void> setup_initial_conditions( [&](auto& index){ auto& df = df_f.at(index); auto& rho = rho_f.at(index); - por_f.at(index).at({}) = {1}; + por_f.at(index).at({}) = {0}; rho.at({}) = {1}; auto& vel = vel_f.at(index); auto eq = equilibrium<T,Desc>(rho,vel); @@ -153,7 +156,7 @@ saw::error_or<void> setup_initial_conditions( auto dist = middle - ind_vec; auto dist_2 = saw::math::dot(dist,dist); if(dist_2.at({}).get() < dim_y*dim_y*0.01){ - porous_f.at(index).at({}) = 0.0; + porous_f.at(index).at({}) = 1.0; } }, {},// 0-index @@ -176,7 +179,7 @@ saw::error_or<void> step( // auto coll_ev = q.submit([&](acpp::sycl::handler& h){ - component<T,Desc,cmpt::HLBM,encode::Sycl<saw::encode::Native>> collision{0.65}; + component<T,Desc,cmpt::FpLbmOneParticleNoVelocity,encode::Sycl<saw::encode::Native>> collision{0.65}; component<T,Desc,cmpt::BounceBack,encode::Sycl<saw::encode::Native>> bb; component<T,Desc,cmpt::AntiBounceBack<0u>,encode::Sycl<saw::encode::Native>> abb; |
