summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2025-06-26 14:15:50 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2025-06-26 14:15:50 +0200
commit7e4d50062f0d5eec2f59d4113beedf282c3e2da4 (patch)
treec90bba3830200b8efa21bd749fae9a72355c356f
parentcab30f5fff0c8e96a81f2addb7c190a55b9f5377 (diff)
Fixed bug with forgotten DF change
-rw-r--r--c++/collision.hpp2
-rw-r--r--examples/cavity_2d.cpp23
2 files changed, 4 insertions, 21 deletions
diff --git a/c++/collision.hpp b/c++/collision.hpp
index c28ec21..d9eb2c0 100644
--- a/c++/collision.hpp
+++ b/c++/collision.hpp
@@ -50,7 +50,7 @@ public:
saw::data<T> rho;
saw::data<sch::FixedArray<T,Descriptor::D>> vel;
- compute_rho_u<T,Descriptor>(dfs,rho,vel);
+ compute_rho_u<T,Descriptor>(dfs_old,rho,vel);
auto eq = equilibrium<T,Descriptor>(rho,vel);
for(uint64_t i = 0u; i < Descriptor::Q; ++i){
diff --git a/examples/cavity_2d.cpp b/examples/cavity_2d.cpp
index ca42894..2860674 100644
--- a/examples/cavity_2d.cpp
+++ b/examples/cavity_2d.cpp
@@ -259,18 +259,16 @@ void lbm_step(
switch(info({0u}).get()){
case 1u: {
- coll.apply(latt, {{i,j}}, time_step+1u);
+ coll.apply(latt, {{i,j}}, time_step);
break;
}
case 2u: {
auto& df = even_step ? cell.template get<"dfs_old">() : cell.template get<"dfs">();
- // bb_lid.apply(df);
+ bb_lid.apply(df);
break;
}
case 3u: {
- auto& df = even_step ? cell.template get<"dfs_old">() : cell.template get<"dfs">();
- // bb_two.apply(df);
- // bb.apply(latt, {{i,j}}, time_step);
+ bb.apply(latt, {{i,j}}, time_step);
break;
}
default:
@@ -279,21 +277,6 @@ void lbm_step(
}
}
- apply_for_cells([&](auto cell, size_t i, size_t j){
- auto& info = cell.template get<"info">();
-
- auto info_v = info({0u}).get();
- switch(info_v){
- case 3u: {
- auto& df = even_step ? cell.template get<"dfs_old">() : cell.template get<"dfs">();
- bb_two.apply(df);
- break;
- }
- default:
- break;
- }
- },latt);
-
// Stream
for(uint64_t i = 1u; (i+1u) < latt.template get_dim_size<0>().get(); ++i){
for(uint64_t j = 1u; (j+1u) < latt.template get_dim_size<1>().get(); ++j){