summaryrefslogtreecommitdiff
path: root/examples/moving_poiseulle_particles_2d_hlbm_gpu
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-07-21 23:43:30 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-07-21 23:43:30 +0200
commitda8cb1c7dd40ef18b85685f99369a31ee36370a1 (patch)
tree1b5faa3f7a2dbc1558891eeda7b2cacd8a56fd0d /examples/moving_poiseulle_particles_2d_hlbm_gpu
parent7f3e504e27c4cef0fb290dce5c046dd299d73046 (diff)
parent25a1c2485c5187c61a8efc9f5b62d4d942124d47 (diff)
downloadlibs-lbm-da8cb1c7dd40ef18b85685f99369a31ee36370a1.tar.gz
Merge branch 'dev'HEADmaster
Diffstat (limited to 'examples/moving_poiseulle_particles_2d_hlbm_gpu')
-rw-r--r--examples/moving_poiseulle_particles_2d_hlbm_gpu/sim.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/moving_poiseulle_particles_2d_hlbm_gpu/sim.cpp b/examples/moving_poiseulle_particles_2d_hlbm_gpu/sim.cpp
index a41d2b7..b2061f9 100644
--- a/examples/moving_poiseulle_particles_2d_hlbm_gpu/sim.cpp
+++ b/examples/moving_poiseulle_particles_2d_hlbm_gpu/sim.cpp
@@ -155,7 +155,14 @@ saw::error_or<void> setup_initial_conditions(
auto& rbp = rb.template get<"position">();
rbp.at({{0u}}) = 0.25 * dim_x;
rbp.at({{1u}}) = 0.5 * dim_y;
- auto& rbp_old = rbp;
+ rb.template get<"position_old">() = rbp;
+ saw::data<sch::Vector<T,Desc::D>> zero;
+ zero.at({{0u}}) = 0.0f;
+ zero.at({{1u}}) = 0.0f;
+ rb.template get<"acceleration">() = zero;
+ rb.template get<"rotation">() = {};
+ rb.template get<"rotation_old">() = {};
+ rb.template get<"angular_acceleration">() = {};
}
return saw::make_void();