summaryrefslogtreecommitdiff
path: root/lib/core/c++/boundary.hpp
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-03-23 16:41:32 +0100
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-03-23 16:41:32 +0100
commit0d3c1a0f68792a04129dc8da8e9b9b113f76e3ec (patch)
tree1bcf2977a1e349eb4b475019eb90742de942a7e4 /lib/core/c++/boundary.hpp
parentf14adcc650389a3084fdf7955c3716034b33f4f4 (diff)
downloadlibs-lbm-0d3c1a0f68792a04129dc8da8e9b9b113f76e3ec.tar.gz
Found wrong zou he boundary issue. Preparing for fix
Diffstat (limited to 'lib/core/c++/boundary.hpp')
-rw-r--r--lib/core/c++/boundary.hpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/core/c++/boundary.hpp b/lib/core/c++/boundary.hpp
index adb473d..bb8eed9 100644
--- a/lib/core/c++/boundary.hpp
+++ b/lib/core/c++/boundary.hpp
@@ -206,16 +206,17 @@ public:
/**
* Get the sum of the unknown dfs and precalculate the direction
*/
- auto sum_unknown_dfs = (rho_setting_ - sum_df) * saw::data<FP>{known_dir};
+ auto sum_unknown_dfs = (rho_setting_ - sum_df);
+ auto unknown_dfs_dir = sum_unknown_dfs * saw::data<FP>{known_dir};
for(saw::data<sch::UInt64> k{0u}; k < saw::data<sch::UInt64>{Descriptor::Q}; ++k){
auto c_k = dfi::directions[k.get()];
if(c_k[0u]*known_dir < 0){
- sum_unknown_dfs += dfs_old.at({k}) * c_k[0u];
+ unknown_dfs_dir += dfs_old.at({k}) * c_k[0u];
}
}
- auto vel_x = sum_unknown_dfs / rho_setting_;
+ auto vel_x = unknown_dfs_dir / rho_setting_;
static_assert(Descriptor::D == 2u and Descriptor::Q == 9u, "Some parts are hard coded sadly");