summaryrefslogtreecommitdiff
path: root/examples/stokes_drag_particle_2d_fplbm_gpu
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-07-04 21:58:38 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-07-04 21:58:38 +0200
commit803bf67093d621509d4d8d4af326fa2c66c299bc (patch)
treed7710be92f188927cf4ad33cae071e5830ddbc30 /examples/stokes_drag_particle_2d_fplbm_gpu
parent761e4912e14324ccf713b9309336816cd3283b38 (diff)
downloadlibs-lbm-803bf67093d621509d4d8d4af326fa2c66c299bc.tar.gz
Dangling changes
Diffstat (limited to 'examples/stokes_drag_particle_2d_fplbm_gpu')
-rw-r--r--examples/stokes_drag_particle_2d_fplbm_gpu/sim.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/examples/stokes_drag_particle_2d_fplbm_gpu/sim.cpp b/examples/stokes_drag_particle_2d_fplbm_gpu/sim.cpp
index 17df764..78e7ba5 100644
--- a/examples/stokes_drag_particle_2d_fplbm_gpu/sim.cpp
+++ b/examples/stokes_drag_particle_2d_fplbm_gpu/sim.cpp
@@ -10,8 +10,8 @@
namespace kel {
namespace lbm {
-constexpr uint64_t dim_y = 256ul;
-constexpr uint64_t dim_x = dim_y * 20ul;
+constexpr uint64_t dim_y = 1024ul;
+constexpr uint64_t dim_x = dim_y * 2ul;
constexpr uint64_t particle_amount = 1ul;
@@ -86,7 +86,23 @@ saw::error_or<void> setup_initial_conditions(
info_f.get_dims(),
{{1u,1u}}
);
-
+ // Corners
+ /// Inflow
+ iterator<Desc::D>::apply(
+ [&](auto& index){
+ info_f.at(index).set(5u);
+ },
+ {{0u,0u}},
+ {{1u,dim_y}}
+ );
+ /// Outflow
+ iterator<Desc::D>::apply(
+ [&](auto& index){
+ info_f.at(index).set(5u);
+ },
+ {{dim_x-1u,0u}},
+ {{dim_x, dim_y}}
+ );
// Inflow
iterator<Desc::D>::apply(
[&](auto& index){
@@ -193,7 +209,7 @@ saw::error_or<void> step(
rad.at({}).set(dim_y*0.1);
saw::data<sch::Vector<T,Desc::D>> p_pos;
{
- p_pos.at({{0u}}) = dim_x * 0.25;
+ p_pos.at({{0u}}) = dim_x * 0.5;
p_pos.at({{1u}}) = dim_y * 0.5;
}
component<T,Desc,cmpt::OneParticleAt,encode::Sycl<saw::encode::Native>> opa{p_pos,rad,eps};