summaryrefslogtreecommitdiff
path: root/lib/core/c++/hlbm.hpp
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-02-12 21:43:44 +0100
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-02-12 21:43:44 +0100
commit62c7dcd0c508ca9559e923a023181600196bf5ca (patch)
tree43d732a0c8f3c5476a8d9d158c0a7af3f221c11d /lib/core/c++/hlbm.hpp
parent3e7f672b35f4a2196be8f27d35ef527eec79179d (diff)
downloadlibs-lbm-62c7dcd0c508ca9559e923a023181600196bf5ca.tar.gz
HLBM kinda broken again?
Diffstat (limited to 'lib/core/c++/hlbm.hpp')
-rw-r--r--lib/core/c++/hlbm.hpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/core/c++/hlbm.hpp b/lib/core/c++/hlbm.hpp
index 8f267d5..0373125 100644
--- a/lib/core/c++/hlbm.hpp
+++ b/lib/core/c++/hlbm.hpp
@@ -40,15 +40,17 @@ public:
saw::data<sch::Scalar<T>>& rho = rho_f.at(index);
saw::data<sch::Vector<T,Descriptor::D>> vel = vel_f.at(index);
- compute_rho_u<T,Descriptor::D>(dfs_old_f.at(index), rho, vel);
+ compute_rho_u<T,Descriptor>(dfs_old_f.at(index), rho, vel);
auto& porosity = porosity_f.at(index);
- auto flip_porosity = saw::data<sch::Scalar<T>>{1.0} - porosity;
+ saw::data<sch::Scalar<T>> one;
+ one.at({}) = 1.0;
+ auto flip_porosity = one - porosity;
auto& N = particle_N_f.at(index);
auto& D = particle_D_f.at(index);
// Convex combination of velocities
- vel = vel * flip_porosity + N * porosity / D;
+ vel = vel * porosity + N * flip_porosity / D;
// Equilibrium
auto eq = equilibrium<T,Descriptor>(rho,vel);
@@ -57,7 +59,7 @@ public:
}
porosity.at({}) = 1.0;
-
+ D.at({}) = 0.0;
}
};