summaryrefslogtreecommitdiff
path: root/modules/core/c++/hlbm.hpp
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-07-23 17:33:21 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-07-23 17:33:21 +0200
commit67bc9fe039ebb61ae6f8b799aa9f3359aff2cd3c (patch)
tree9cdda2e1d018c5dee284a579e04d22a473ffe321 /modules/core/c++/hlbm.hpp
parentc8bea2d6a8c6cd6b0950d75646eef0becf1fce1e (diff)
parent127e2d3cb7330d90d69abee5f4445743317391a9 (diff)
downloadlibs-lbm-67bc9fe039ebb61ae6f8b799aa9f3359aff2cd3c.tar.gz
Merge branch 'dev'
Diffstat (limited to 'modules/core/c++/hlbm.hpp')
-rw-r--r--modules/core/c++/hlbm.hpp17
1 files changed, 10 insertions, 7 deletions
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<sch::Vector<T,Desc::D>> force_p;
- iterator<Desc::D>::apply([&](const auto& index_f){
+ iterator<Desc::D>::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: "<<index.at({0u}).get()<<" "<<index.at({1u}).get()<<std::endl;
auto& dfs = dfs_old_f.at(index_f);
-
+ auto& mpor = mpor_f.at(index_f);
+ auto rel_dist = saw::math::vectorize_data(index_f).template cast_to<T>() - pirb_pos;
+ saw::data<sch::Scalar<T>> eps;
+ eps.at({}) = 1.5f;
+ mpor = particle_porosity<T,Desc::D,1u,por::ParticleSpheroid<T>>::calculate(rel_dist,p_rad,eps);
+ if(mpor.at({}).get() < 1.0f){
+ return;
+ }
+
saw::data<sch::Vector<T,Desc::D>> 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<T>() - pirb_pos;
- saw::data<sch::Scalar<T>> eps;
- eps.at({}) = 1.5f;
- mpor = particle_porosity<T,Desc::D,1u,por::ParticleSpheroid<T>>::calculate(rel_dist,p_rad,eps);
force_p = force_p + momentum * mpor;
},start,stop);