summaryrefslogtreecommitdiff
path: root/lib/core/c++/fplbm.hpp
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-06-30 23:52:02 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-06-30 23:52:02 +0200
commit2bae8b93faf614b1acb5df7269087b4f3786da5a (patch)
treea6db1328ed035c6130b6b29110e0891f6c78c7e4 /lib/core/c++/fplbm.hpp
parentb88d59477a7973bdee102aaf0e26c13c9059048b (diff)
downloadlibs-lbm-2bae8b93faf614b1acb5df7269087b4f3786da5a.tar.gz
Final run
Diffstat (limited to 'lib/core/c++/fplbm.hpp')
-rw-r--r--lib/core/c++/fplbm.hpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/core/c++/fplbm.hpp b/lib/core/c++/fplbm.hpp
index 61def6b..c974472 100644
--- a/lib/core/c++/fplbm.hpp
+++ b/lib/core/c++/fplbm.hpp
@@ -114,6 +114,19 @@ public:
auto& vel_f = macros.template get<"velocity">();
auto& por_f = macros.template get<"porosity">();
+ // Temporary find a better way
+ auto& force_f = macros.template get<"force">();
+
+
+ /**
+ * The other methods all work with a flipped porosity.
+ * For compat reasons this is also flipped
+ */
+ auto porosity = por_f.at(index);
+ saw::data<sch::Scalar<T>> one;
+ one.at({}) = 1.0;
+ auto flip_porosity = one - porosity;
+
saw::data<sch::Scalar<T>>& rho = rho_f.at(index);
saw::data<sch::Scalar<T>> half;
@@ -128,12 +141,13 @@ public:
saw::data<sch::Scalar<T>> min_two;
min_two.at({}).set(-2);
- auto force = vel * rho * min_two * por_f.at(index);
+ // Maybe ?
+ auto& force = force_f.at(index);
+ force = vel * rho * min_two * flip_porosity;
saw::data<sch::Scalar<T>> dfi_inv_cs2;
dfi_inv_cs2.at({}).set(dfi::inv_cs2);
-
// auto vel = vel_f.at(index);
for(uint64_t i = 0u; i < Descriptor::Q; ++i){