From 8e22658bf3791fb5b1f9a11b5a5408d5e4e3f732 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Tue, 19 May 2026 15:05:59 +0200 Subject: Adding particle to hlbm --- lib/core/c++/hlbm.hpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'lib/core') diff --git a/lib/core/c++/hlbm.hpp b/lib/core/c++/hlbm.hpp index 41e2e27..7af4f7e 100644 --- a/lib/core/c++/hlbm.hpp +++ b/lib/core/c++/hlbm.hpp @@ -8,6 +8,7 @@ namespace kel { namespace lbm { namespace cmpt { struct HLBM {}; +struct HlbmParticle {}; } /** @@ -65,5 +66,29 @@ public: } }; +template +class component final { +private: + typename saw::native_data_type::type relaxation_; + saw::data frequency_; +public: + + template + void apply(const saw::data& field, const saw::data& macros, const saw::data& particles, saw::data> index, saw::data time_step) const { + /// Figure out how to access the particle list + auto& p = particles.at(i); + + /// Iterate over the grid bounds + auto& grid = p.template get<"grid">(); + + iterator::apply([&](const auto& index){ + auto& g_i = grid.at(index); + + /// Pick up forces and calculate to rigid body TODO + + }); + + } +}; } } -- cgit v1.2.3