summaryrefslogtreecommitdiff
path: root/examples/moving_poiseulle_particles_2d_fplbm_gpu/sim.cpp
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-08-07 12:34:45 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-08-07 12:34:45 +0200
commit5d4192c73c72f29debe0f3b6e73889f0204ab74a (patch)
treec3b0c1084e3e0642cb986522e6222239669d0f88 /examples/moving_poiseulle_particles_2d_fplbm_gpu/sim.cpp
parenta5c654598544f2a33289664ba73a77343d301ce2 (diff)
parent7d094fe719923db5eb6b30edcc4fa01c6ce2cc2e (diff)
downloadlibs-lbm-5d4192c73c72f29debe0f3b6e73889f0204ab74a.tar.gz
Merge branch 'dev'
Diffstat (limited to 'examples/moving_poiseulle_particles_2d_fplbm_gpu/sim.cpp')
-rw-r--r--examples/moving_poiseulle_particles_2d_fplbm_gpu/sim.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/examples/moving_poiseulle_particles_2d_fplbm_gpu/sim.cpp b/examples/moving_poiseulle_particles_2d_fplbm_gpu/sim.cpp
index f6c09e9..c82f632 100644
--- a/examples/moving_poiseulle_particles_2d_fplbm_gpu/sim.cpp
+++ b/examples/moving_poiseulle_particles_2d_fplbm_gpu/sim.cpp
@@ -141,7 +141,7 @@ saw::error_or<void> init(
rad.at({}) = dim_y * 0.1f;
saw::data<sch::Scalar<T>> dense;
dense.at({}) = 1.0f;
- particles = create_spheroid_particle_group<T,Desc::D,particle_amount>(rad,dense,{16u});
+ particles = create_spheroid_particle_group<T,Desc::D,particle_amount>(rad,dense,{1u});
{
auto& rb = particles.template get<"particles">().at({0u}).template get<"rigid_body">();
auto& rbp = rb.template get<"position">();
@@ -179,13 +179,13 @@ saw::error_or<void> step(
for(uint64_t i = 0u; i < Desc::D; ++i){
index.at({{i}}).set(idx[i]);
}
-
+
fplbm_reset.apply(fields,macros,index,t_i);
});
}).wait();
q.submit([&](acpp::sycl::handler& h){
- component<T,Desc,cmpt::FpLbmOneParticle,encode::Sycl<saw::encode::Native>> fplbm_one_part;
+ component<T,Desc,cmpt::FpLbmOneParticleImplicit,encode::Sycl<saw::encode::Native>> fplbm_one_part;
h.parallel_for(acpp::sycl::range<1u>{particle_amount}, [=](acpp::sycl::id<1u> idx){
saw::data<sch::FixedArray<sch::UInt64,1u>> index;
@@ -193,12 +193,13 @@ saw::error_or<void> step(
index.at({{i}}).set(idx[i]);
}
- fplbm_one_part.apply(fields,macros,particles,index,t_i,{1u});
+ fplbm_one_part.apply(fields,macros,particles,index,t_i,{16u});
});
}).wait();
// auto coll_ev =
q.submit([&](acpp::sycl::handler& h){
+ component<T,Desc,cmpt::BGK,encode::Sycl<saw::encode::Native>> bgk{0.8};
component<T,Desc,cmpt::FpLbm,encode::Sycl<saw::encode::Native>> collision{0.8};
component<T,Desc,cmpt::BounceBack,encode::Sycl<saw::encode::Native>> bb;
@@ -232,11 +233,11 @@ saw::error_or<void> step(
break;
case 3u:
flow_in.apply(fields,index,t_i);
- collision.apply(fields,macros,index,t_i);
+ bgk.apply(fields,macros,index,t_i);
break;
case 4u:
flow_out.apply(fields,index,t_i);
- collision.apply(fields,macros,index,t_i);
+ bgk.apply(fields,macros,index,t_i);
break;
default:
break;
@@ -261,7 +262,7 @@ saw::error_or<void> lbm_main(int argc, char** argv){
}
auto& lbm_dir = eo_lbm_dir.get_value();
- auto out_dir = lbm_dir / "moving_poiseulle_particles_2d_fplbm_gpu";
+ auto out_dir = lbm_dir / "moving_poiseulle_particles_2d_fplbm_imp_gpu";
{
std::error_code ec;