diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-03-24 17:41:28 +0100 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-03-24 17:41:28 +0100 |
| commit | 3af0e20773b21b519ea474e34e7c1df73d04a307 (patch) | |
| tree | 45d1e7842b2f9866053824e9fb6ddf088723e973 /lib/core/c++/collision.hpp | |
| parent | 72e61f9d345c43a6106e68c207bb0d2e11237adb (diff) | |
| download | libs-lbm-3af0e20773b21b519ea474e34e7c1df73d04a307.tar.gz | |
Dangling changes
Diffstat (limited to 'lib/core/c++/collision.hpp')
| -rw-r--r-- | lib/core/c++/collision.hpp | 15 |
1 files changed, 13 insertions, 2 deletions
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<T, Descriptor, cmpt::BGKGuo, Encode> { private: typename saw::native_data_type<T>::type relaxation_; saw::data<T> frequency_; + saw::data<sch::Vector<T,Descriptor::D>> global_force_; public: component(typename saw::native_data_type<T>::type relaxation__): relaxation_{relaxation__}, - frequency_{typename saw::native_data_type<T>::type(1) / relaxation_} + frequency_{typename saw::native_data_type<T>::type(1) / relaxation_}, + global_force_{} + {} + + component( + typename saw::native_data_type<T>::type relaxation__, + saw::data<sch::Vector<T,Descriptor::D>>& global_force__ + ): + relaxation_{relaxation__}, + frequency_{typename saw::native_data_type<T>::type(1) / relaxation_}, + global_force_{global_force__} {} using Component = cmpt::BGKGuo; @@ -153,7 +164,7 @@ public: saw::data<sch::Scalar<T>> 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<sch::Scalar<T>> F_i_sum; for(uint64_t d = 0u; d < Descriptor::D; ++d){ |
