From 127e2d3cb7330d90d69abee5f4445743317391a9 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Thu, 23 Jul 2026 17:32:58 +0200 Subject: Fixed probably momentum capture --- modules/core/c++/hlbm.hpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'modules/core/c++') diff --git a/modules/core/c++/hlbm.hpp b/modules/core/c++/hlbm.hpp index 9356264..e587b0a 100644 --- a/modules/core/c++/hlbm.hpp +++ b/modules/core/c++/hlbm.hpp @@ -156,13 +156,21 @@ public: saw::data> force_p; - iterator::apply([&](const auto& index_f){ + iterator::apply([&](const auto& index_f) -> void{ // ask for the d_k value here. // For every value im iterating over I need sth // std::cout<<"Pos: "<() - pirb_pos; + saw::data> eps; + eps.at({}) = 1.5f; + mpor = particle_porosity>::calculate(rel_dist,p_rad,eps); + if(mpor.at({}).get() < 1.0f){ + return; + } + saw::data> momentum; for(uint64_t i = 0u; i < Desc::Q; ++i){ @@ -183,11 +191,6 @@ public: momentum = momentum + ei_dfs; } - auto& mpor = mpor_f.at(index_f); - auto rel_dist = saw::math::vectorize_data(index_f).template cast_to() - pirb_pos; - saw::data> eps; - eps.at({}) = 1.5f; - mpor = particle_porosity>::calculate(rel_dist,p_rad,eps); force_p = force_p + momentum * mpor; },start,stop); -- cgit v1.2.3