From 9f9a22130ee10a0306a0bedf902b02805cbf1234 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Wed, 18 Mar 2026 16:16:43 +0100 Subject: Fix default builds referencing old naming schema --- default.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/default.nix b/default.nix index 2b99863..2232e47 100644 --- a/default.nix +++ b/default.nix @@ -162,11 +162,6 @@ in rec { inherit kel; }; - s_poiseulle_particles_2d_gpu = pkgs.callPackage ./examples/s_poiseulle_particles_2d_gpu/.nix/derivation.nix { - inherit pname version stdenv forstio adaptive-cpp; - inherit kel; - }; - poiseulle_3d = pkgs.callPackage ./examples/poiseulle_3d/.nix/derivation.nix { inherit pname version stdenv forstio adaptive-cpp; inherit kel; @@ -198,7 +193,9 @@ in rec { kel.lbm.core kel.lbm.sycl examples.meta - examples.poiseulle_particles_2d_gpu + examples.poiseulle_particles_2d_bgk_gpu + examples.poiseulle_particles_2d_psm_gpu + examples.poiseulle_particles_2d_hlbm_gpu examples.poiseulle_3d_gpu ]; }; -- cgit v1.2.3 From 48f58ebae7c82180ab756aa8af297de90b876f08 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Thu, 19 Mar 2026 12:13:28 +0100 Subject: Dangling changes --- examples/poiseulle_particles_2d_psm_gpu/sim.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/examples/poiseulle_particles_2d_psm_gpu/sim.cpp b/examples/poiseulle_particles_2d_psm_gpu/sim.cpp index cf68d24..ff636ca 100644 --- a/examples/poiseulle_particles_2d_psm_gpu/sim.cpp +++ b/examples/poiseulle_particles_2d_psm_gpu/sim.cpp @@ -286,7 +286,7 @@ saw::error_or lbm_main(int argc, char** argv){ } auto& lbm_dir = eo_lbm_dir.get_value(); - auto out_dir = lbm_dir / "poiseulle_particles_2d_gpu"; + auto out_dir = lbm_dir / "poiseulle_particles_2d_psm_gpu"; { std::error_code ec; @@ -385,6 +385,7 @@ saw::error_or lbm_main(int argc, char** argv){ } } sycl_q.wait(); + /* { { auto eov = dev.copy_to_host(lbm_sycl_macro_data,*lbm_macro_data_ptr); @@ -399,6 +400,7 @@ saw::error_or lbm_main(int argc, char** argv){ } } } + */ /* { { @@ -442,6 +444,12 @@ saw::error_or lbm_main(int argc, char** argv){ // After Loop sycl_q.wait(); + { + auto eov = dev.copy_to_host(lbm_sycl_macro_data,*lbm_macro_data_ptr); + if(eov.is_error()){ + return eov; + } + } { auto eov = write_vtk_file(out_dir,"m",time_steps.get(), *lbm_macro_data_ptr); if(eov.is_error()){ -- cgit v1.2.3 From df2ce610f0389edb0583fed15eaabe5d21518fb5 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Thu, 19 Mar 2026 12:37:17 +0100 Subject: Add AntiBounce Back as well --- lib/core/c++/boundary.hpp | 52 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/lib/core/c++/boundary.hpp b/lib/core/c++/boundary.hpp index 9afdfd7..3503681 100644 --- a/lib/core/c++/boundary.hpp +++ b/lib/core/c++/boundary.hpp @@ -8,6 +8,9 @@ namespace lbm { namespace cmpt { struct BounceBack {}; +template +struct AntiBounceBack {}; + template struct ZouHeHorizontal{}; @@ -69,6 +72,55 @@ public: } }; +/** + * Anti Full-Way BounceBack. + */ +template +class component, Encode> { +private: +public: + component() = default; + + using Component = cmpt::AntiBounceBack; + + /** + * Thoughts regarding automating order setup + */ + using access = cmpt::access_tuple< + cmpt::access<"dfs", 1, true, true, true> + >; + + /** + * Thoughts regarding automating order setup + */ + static constexpr saw::string_literal name = "full_way_anti_bounce_back"; + static constexpr saw::string_literal after = ""; + static constexpr saw::string_literal before = "streaming"; + + /** + * Raw setup + */ + template + void apply(const saw::data& field, const saw::data>& index, saw::data time_step)const{ + bool is_even = ((time_step.get() % 2u) == 0u); + + // This is a ref + + // auto& dfs_f = (is_even) ? field.template get<"dfs">() : field.template get<"dfs_old">(); + auto& dfs_old_f = (is_even) ? field.template get<"dfs_old">() : field.template get<"dfs">(); + + using dfi = df_info; + + // Technically use .copy() + auto& dfs_old = dfs_old_f.at(index); + auto df_cpy = dfs_old; + + for(uint64_t i = 0u; i < Descriptor::Q; ++i){ + dfs_old.at({i}) = df_cpy.at({dfi::opposite_index.at(i)}); + } + } +}; + template class component final { private: -- cgit v1.2.3