summaryrefslogtreecommitdiff
path: root/examples/settling_cubes_2d_ibm_gpu
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-05-19 15:04:59 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-05-19 15:04:59 +0200
commit81b7d6d2c09bbff6d9c1738fbb52f7c9a90b10de (patch)
tree254862bed09c747a1d948ba2672571f3ebff3a69 /examples/settling_cubes_2d_ibm_gpu
parent4f3f21f72602ab4ce49caa6e7264d369afc98977 (diff)
downloadlibs-lbm-81b7d6d2c09bbff6d9c1738fbb52f7c9a90b10de.tar.gz
IBM reimplement
Diffstat (limited to 'examples/settling_cubes_2d_ibm_gpu')
-rw-r--r--examples/settling_cubes_2d_ibm_gpu/sim.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/settling_cubes_2d_ibm_gpu/sim.cpp b/examples/settling_cubes_2d_ibm_gpu/sim.cpp
index d7b402a..9fdea8c 100644
--- a/examples/settling_cubes_2d_ibm_gpu/sim.cpp
+++ b/examples/settling_cubes_2d_ibm_gpu/sim.cpp
@@ -145,8 +145,7 @@ saw::error_or<void> setup_initial_conditions(
}
}
// Particle in hacky flavour
- {
- }
+ {}
return saw::make_void();
}
@@ -197,6 +196,8 @@ saw::error_or<void> step(
auto& p_pos = p_rb.template get<"position">();
auto& p_rot = p_rb.template get<"rotation">();
+ auto& p_acc = p_rb.template get<"acceleration">();
+
iterator<Desc::D>::apply(
[&](auto& m_ind){
saw::data<sch::Vector<T,Desc::D>> index_shift;
@@ -238,6 +239,7 @@ saw::error_or<void> step(
forces.at(p_cell_pos) = forces.at(p_cell_pos) + force;
// TODO APPLY FORCE TO PARTICLE
+ p_acc = p_acc + force; // TODO divide by mass
},
{},
p_mask.meta()