diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-05-19 15:05:59 +0200 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-05-19 15:06:18 +0200 |
| commit | 8e22658bf3791fb5b1f9a11b5a5408d5e4e3f732 (patch) | |
| tree | 538897e262744f79e013f40cd53153e16f177fad /lib | |
| parent | 81b7d6d2c09bbff6d9c1738fbb52f7c9a90b10de (diff) | |
| download | libs-lbm-8e22658bf3791fb5b1f9a11b5a5408d5e4e3f732.tar.gz | |
Adding particle to hlbm
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/core/c++/hlbm.hpp | 25 |
1 files changed, 25 insertions, 0 deletions
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<typename T, typename Descriptor, typename Encode> +class component<T, Descriptor, cmpt::HlbmParticle, Encode> final { +private: + typename saw::native_data_type<T>::type relaxation_; + saw::data<T> frequency_; +public: + + template<typename CellFieldSchema, typename MacroFieldSchema> + void apply(const saw::data<CellFieldSchema, Encode>& field, const saw::data<MacroFieldSchema,Encode>& macros, const saw::data<ParticleSchema,Encode>& particles, saw::data<sch::FixedArray<sch::UInt64,1u>> index, saw::data<sch::UInt64> 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<Descriptor::D>::apply([&](const auto& index){ + auto& g_i = grid.at(index); + + /// Pick up forces and calculate to rigid body TODO + + }); + + } +}; } } |
