From 22659a4a4af8be137bcd702b89f1f44cd0fe2455 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Fri, 6 Feb 2026 20:20:05 +0100 Subject: Equilibrium boundaries --- examples/poiseulle_particles_2d_gpu/sim.cpp | 2 +- lib/core/c++/boundary.hpp | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/examples/poiseulle_particles_2d_gpu/sim.cpp b/examples/poiseulle_particles_2d_gpu/sim.cpp index f9ee85b..d53a00c 100644 --- a/examples/poiseulle_particles_2d_gpu/sim.cpp +++ b/examples/poiseulle_particles_2d_gpu/sim.cpp @@ -121,7 +121,7 @@ saw::error_or step( component> bb; component,encode::Sycl> flow_in{ [&](){ - uint64_t target_t_i = 128u; + uint64_t target_t_i = 256u; if(t_i.get() < target_t_i){ return 1.0 + (0.001 / target_t_i) * t_i.get(); } diff --git a/lib/core/c++/boundary.hpp b/lib/core/c++/boundary.hpp index 6d83c79..b70ffbf 100644 --- a/lib/core/c++/boundary.hpp +++ b/lib/core/c++/boundary.hpp @@ -11,6 +11,8 @@ struct BounceBack {}; template struct ZouHeHorizontal{}; +struct Equilibrium {}; + template struct ZouHeVertical{}; } @@ -64,6 +66,28 @@ public: } }; +template +class component final { +private: + saw::data density_; + saw::data velocity_; +public: + component( + saw::data density__, + saw::Data velocity__ + ): + density_{density__}, + velocity_{velocity__} + {} + + template + void apply(const saw::data& field, const saw::data>& index, saw::data time_step)const{ + using dfi = df_info; + + auto& dfs_old_f = (is_even) ? field.template get<"dfs_old">() : field.template get<"dfs">(); + } +}; + /** * This is massively hacky and expects a lot of conditions * Either this or mirrored along the horizontal line works -- cgit v1.2.3