summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-08-25 10:20:08 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-08-25 10:20:08 +0200
commit8895935214f0b4ef6ca5891db0d915dac5a725d5 (patch)
treee876c6aafb40cc758f900c3a5370c2a89e254a32
parentdf4fbe3f6776ba25d7267fdb50ce48eca26b9fba (diff)
parent3a3c0a82a6f97521c15aaac42fc7d23a8ad44c75 (diff)
downloadlibs-lbm-8895935214f0b4ef6ca5891db0d915dac5a725d5.tar.gz
Merge branch 'dev'
-rw-r--r--default.nix2
-rw-r--r--modules/core/c++/fplbm.hpp14
2 files changed, 8 insertions, 8 deletions
diff --git a/default.nix b/default.nix
index 04b2616..b945aab 100644
--- a/default.nix
+++ b/default.nix
@@ -36,7 +36,7 @@ let
inherit stdenv llvmPackages lld;
config = {
- rocm = true;
+ rocm = false;
};
};
diff --git a/modules/core/c++/fplbm.hpp b/modules/core/c++/fplbm.hpp
index d8c075b..1d2b2d4 100644
--- a/modules/core/c++/fplbm.hpp
+++ b/modules/core/c++/fplbm.hpp
@@ -86,16 +86,16 @@ public:
auto& rho_f = macros.template get<"density">();
saw::data<sch::Scalar<T>>& rho = rho_f.at(index);
- auto& vel_f = macros.template get<"momentum">();
- saw::data<sch::Vector<T,Descriptor::D>> vel = vel_f.at(index);
-
auto& force_f = macros.template get<"force">();
auto& force = force_f.at(index);
+ auto& vel_f = macros.template get<"momentum">();
+ saw::data<sch::Vector<T,Descriptor::D>> vel = vel_f.at(index);
+
+ auto eq = equilibrium<T,Descriptor>(rho,vel);
vel = vel + force * half / rho;
// compute_rho_u<T,Descriptor>(dfs,rho,vel);
- auto eq = equilibrium<T,Descriptor>(rho,vel);
using dfi = df_info<T,Descriptor>;
@@ -186,8 +186,8 @@ public:
eps.at({}) = 1.5f;
saw::data<sch::Scalar<T>> sss;
- sss.at({}) = one.at({}) / sub_steps.template cast_to<T>();
- auto vel_s = (pirb_pos-pirb_pos_old) / sss;
+ sss.at({}) = sub_steps.template cast_to<T>();
+ auto vel_s = (pirb_pos-pirb_pos_old) * sss;
saw::data<sch::Vector<T,Descriptor::D>> force_p{};
@@ -213,7 +213,7 @@ public:
pirb_acc = force_p / (two * pg.template get<"total_mass">().at({}));
for(saw::data<sch::UInt64> i{0u}; i < sub_steps; ++i){
- verlet_step_lambda<T,Descriptor::D>(pi,sss);
+ verlet_step_lambda<T,Descriptor::D>(pi,one / sss);
}
}
};