From 3a3c0a82a6f97521c15aaac42fc7d23a8ad44c75 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Tue, 25 Aug 2026 01:23:13 +0200 Subject: I think this might be an issue if I do this via eq. I think doing it via eq is basically HLBM and I applied it twice --- modules/core/c++/fplbm.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'modules/core/c++/fplbm.hpp') 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>& rho = rho_f.at(index); - auto& vel_f = macros.template get<"momentum">(); - saw::data> 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> vel = vel_f.at(index); + + auto eq = equilibrium(rho,vel); vel = vel + force * half / rho; // compute_rho_u(dfs,rho,vel); - auto eq = equilibrium(rho,vel); using dfi = df_info; @@ -186,8 +186,8 @@ public: eps.at({}) = 1.5f; saw::data> sss; - sss.at({}) = one.at({}) / sub_steps.template cast_to(); - auto vel_s = (pirb_pos-pirb_pos_old) / sss; + sss.at({}) = sub_steps.template cast_to(); + auto vel_s = (pirb_pos-pirb_pos_old) * sss; saw::data> force_p{}; @@ -213,7 +213,7 @@ public: pirb_acc = force_p / (two * pg.template get<"total_mass">().at({})); for(saw::data i{0u}; i < sub_steps; ++i){ - verlet_step_lambda(pi,sss); + verlet_step_lambda(pi,one / sss); } } }; -- cgit v1.2.3