From 0c0087ef9482634273ec1a23d3a915754f94926d Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Wed, 11 Nov 2026 01:16:44 +0100 Subject: Snapshot. Migration to Lbm Unit --- examples/poiseulle_particles_2d_gpu/common.hpp | 4 +++- examples/poiseulle_particles_2d_gpu/init.hpp | 4 ++-- examples/poiseulle_particles_2d_gpu/sim.cpp | 9 +++++---- 3 files changed, 10 insertions(+), 7 deletions(-) (limited to 'examples/poiseulle_particles_2d_gpu') diff --git a/examples/poiseulle_particles_2d_gpu/common.hpp b/examples/poiseulle_particles_2d_gpu/common.hpp index 6806b2c..f4c9fed 100644 --- a/examples/poiseulle_particles_2d_gpu/common.hpp +++ b/examples/poiseulle_particles_2d_gpu/common.hpp @@ -48,8 +48,10 @@ using RhoChunk = Chunk, 0u, dim_x, dim_y>; template using MacroStruct = Struct< - Member, "momentum">, + Member, "velocity">, Member, "density">, + // HlbmOneParticleGather reads this one. + Member, "force">, Member, "porosity"> >; diff --git a/examples/poiseulle_particles_2d_gpu/init.hpp b/examples/poiseulle_particles_2d_gpu/init.hpp index a61ef37..333e9a3 100644 --- a/examples/poiseulle_particles_2d_gpu/init.hpp +++ b/examples/poiseulle_particles_2d_gpu/init.hpp @@ -57,7 +57,7 @@ kel::lbm::error_or init( // auto& df_f = fields.template get<"dfs_old">(); auto& rho_f = macros.template get<"density">(); - auto& vel_f = macros.template get<"momentum">(); + auto& vel_f = macros.template get<"velocity">(); auto& por_f = macros.template get<"porosity">(); iterator::apply( @@ -113,7 +113,7 @@ kel::lbm::error_or init( ); { - kel::lbm::data> radius_p; + kel::lbm::data>> radius_p; radius_p.at({}).set(2); kel::lbm::data> dense_p; dense_p.at({}).set(1); diff --git a/examples/poiseulle_particles_2d_gpu/sim.cpp b/examples/poiseulle_particles_2d_gpu/sim.cpp index e852313..f3c001b 100644 --- a/examples/poiseulle_particles_2d_gpu/sim.cpp +++ b/examples/poiseulle_particles_2d_gpu/sim.cpp @@ -2,12 +2,13 @@ #include "init.hpp" #include "step.hpp" -#include /** * For deciding what parameters to use maybe? */ namespace args { +using namespace kel::lbm::sch; + using LbmArgsStruct = Struct< Member, @@ -46,9 +47,9 @@ kel::lbm::error_or lbm_main(const kel::lbm::data& args){ converter conv { // delta_x - {{1.0}}, + {1.0}, // delta_t - {{1.0}} + {1.0} }; print_lbm_meta(conv,{0.1},{1e-4},{0.4 * dim_y}); @@ -197,7 +198,7 @@ kel::lbm::error_or k_main(int argc, char** argv){ kel::lbm::data args; { - auto eov = saw::parse_args(args,argc,argv); + auto eov = kel::lbm::parse_args(args,argc,argv); return eov; } auto& an = args.template get<"args">(); -- cgit v1.3.1