summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-03-03 19:46:31 +0100
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-03-03 19:46:31 +0100
commit16700f013886b8d8cb02e322c2d66c00179d9c89 (patch)
treeb7b72604bb48c6e3e1374a23307476aedf1f77d5
parent75fda9a23cd30efa72bd212d5642c3d30ee34913 (diff)
downloadlibs-lbm-16700f013886b8d8cb02e322c2d66c00179d9c89.tar.gz
Fixing ZouHe?
-rw-r--r--examples/poiseulle_particles_2d_gpu/sim.cpp3
-rw-r--r--lib/core/c++/boundary.hpp4
2 files changed, 4 insertions, 3 deletions
diff --git a/examples/poiseulle_particles_2d_gpu/sim.cpp b/examples/poiseulle_particles_2d_gpu/sim.cpp
index 6d012e0..bb81383 100644
--- a/examples/poiseulle_particles_2d_gpu/sim.cpp
+++ b/examples/poiseulle_particles_2d_gpu/sim.cpp
@@ -131,7 +131,7 @@ saw::error_or<void> setup_initial_conditions(
rho.at({}) = {1};
auto& vel = vel_f.at(index);
if(info_f.at(index).get() == 2u){
- vel.at({{0u}}) = 0.01;
+ vel.at({{0u}}) = 0.0;
}
auto eq = equilibrium<T,Desc>(rho,vel);
@@ -433,6 +433,7 @@ saw::error_or<void> lbm_main(int argc, char** argv){
std::cout<<"Status: "<<i.get()<<" of "<<time_steps.get()<<" - "<<(i.template cast_to<sch::Float64>().get() * 100 / time_steps.get())<<"%"<<std::endl;
print_status = false;
}
+ print_progress_bar(i.get(), time_steps.get()-1u);
}
// After Loop
diff --git a/lib/core/c++/boundary.hpp b/lib/core/c++/boundary.hpp
index d5f3022..0a4ff4d 100644
--- a/lib/core/c++/boundary.hpp
+++ b/lib/core/c++/boundary.hpp
@@ -135,7 +135,7 @@ public:
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){
+ if(c_k[0u]*known_dir >= 0){
sum_df += dfs_old.at({k});
}
}
@@ -147,7 +147,7 @@ public:
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){
+ if(c_k[0u]*known_dir > 0){
sum_unknown_dfs += dfs_old.at({k}) * c_k[0u];
}
}