From 4fab8965692f75fea3cbbabb3381bfeb00511669 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Sun, 5 Jul 2026 22:13:52 +0200 Subject: Found c++ magic --- examples/stokes_drag_particle_2d_hlbm_gpu/sim.cpp | 2 ++ modules/core/c++/hlbm.hpp | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/stokes_drag_particle_2d_hlbm_gpu/sim.cpp b/examples/stokes_drag_particle_2d_hlbm_gpu/sim.cpp index a919bbe..49e6d43 100644 --- a/examples/stokes_drag_particle_2d_hlbm_gpu/sim.cpp +++ b/examples/stokes_drag_particle_2d_hlbm_gpu/sim.cpp @@ -197,6 +197,7 @@ saw::error_or step( q.submit([&](acpp::sycl::handler& h){ component> bgk{0.8}; component> collision{0.8}; + component> one_part_moment; component> bb; component,encode::Sycl> abb; @@ -241,6 +242,7 @@ saw::error_or step( break; case 2u: opa.apply(macros,index,t_i); + one_part_moment.apply(fields,macros,index,t_i); collision.apply(fields,macros,index,t_i); fg.apply(fields,macros,index,t_i); break; diff --git a/modules/core/c++/hlbm.hpp b/modules/core/c++/hlbm.hpp index 677d37a..346ec04 100644 --- a/modules/core/c++/hlbm.hpp +++ b/modules/core/c++/hlbm.hpp @@ -156,8 +156,9 @@ template class component final { public: template - void apply(const saw::data& field, const saw::data& macros, const saw::data& part_group, saw::data> index, saw::data time_step) const { + void apply(const saw::data& field, const saw::data& macros, saw::data> index, saw::data time_step) const { // + using dfi = df_info; bool is_even = ((time_step.get() % 2) == 0); auto& dfs_old_f = (is_even) ? field.template get<"dfs_old">() : field.template get<"dfs">(); @@ -177,7 +178,7 @@ public: auto& force_f = macros.template get<"force">(); // Set Force - force.at(index) = momentum * macros.template get<"density">().at(index); + force_f.at(index) = momentum * macros.template get<"porosity">().at(index); } }; } -- cgit v1.2.3