From 81b7d6d2c09bbff6d9c1738fbb52f7c9a90b10de Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Tue, 19 May 2026 15:04:59 +0200 Subject: IBM reimplement --- examples/settling_cubes_2d_ibm_gpu/sim.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'examples/settling_cubes_2d_ibm_gpu') 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 setup_initial_conditions( } } // Particle in hacky flavour - { - } + {} return saw::make_void(); } @@ -197,6 +196,8 @@ saw::error_or 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::apply( [&](auto& m_ind){ saw::data> index_shift; @@ -238,6 +239,7 @@ saw::error_or 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() -- cgit v1.2.3