From 3af0e20773b21b519ea474e34e7c1df73d04a307 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Tue, 24 Mar 2026 17:41:28 +0100 Subject: Dangling changes --- lib/core/c++/collision.hpp | 15 +++++++++++++-- lib/core/c++/particle/particle.hpp | 5 ++++- 2 files changed, 17 insertions(+), 3 deletions(-) (limited to 'lib/core') diff --git a/lib/core/c++/collision.hpp b/lib/core/c++/collision.hpp index f8312c0..df45bbe 100644 --- a/lib/core/c++/collision.hpp +++ b/lib/core/c++/collision.hpp @@ -95,10 +95,21 @@ class component { private: typename saw::native_data_type::type relaxation_; saw::data frequency_; + saw::data> global_force_; public: component(typename saw::native_data_type::type relaxation__): relaxation_{relaxation__}, - frequency_{typename saw::native_data_type::type(1) / relaxation_} + frequency_{typename saw::native_data_type::type(1) / relaxation_}, + global_force_{} + {} + + component( + typename saw::native_data_type::type relaxation__, + saw::data>& global_force__ + ): + relaxation_{relaxation__}, + frequency_{typename saw::native_data_type::type(1) / relaxation_}, + global_force_{global_force__} {} using Component = cmpt::BGKGuo; @@ -153,7 +164,7 @@ public: saw::data> w; w.at({}).set(dfi::weights[i]); - auto F_i_d = saw::math::dot(force * w, (ci - vel * dfi_inv_cs2 + ci * ci_dot_u * dfi_inv_cs2 * dfi_inv_cs2 )); + auto F_i_d = saw::math::dot((force+global_force_) * w, (ci - vel * dfi_inv_cs2 + ci * ci_dot_u * dfi_inv_cs2 * dfi_inv_cs2 )); /* saw::data> F_i_sum; for(uint64_t d = 0u; d < Descriptor::D; ++d){ diff --git a/lib/core/c++/particle/particle.hpp b/lib/core/c++/particle/particle.hpp index 8ef590d..f8104fd 100644 --- a/lib/core/c++/particle/particle.hpp +++ b/lib/core/c++/particle/particle.hpp @@ -43,12 +43,15 @@ using ParticleCollisionSpheroid = Struct< Member, "radius"> >; +tem + template> using Particle = Struct< Member, "rigid_body">, Member, // Problem is that dynamic data would two layered - // Member, "mask">, + // Member, "mask">, + Member, Member, "mass"> >; } -- cgit v1.2.3