From abd0dbdca5735a8281e5df27181cc08ec51dae54 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Thu, 19 Feb 2026 18:14:39 +0100 Subject: Proper distribution --- lib/core/c++/collision.hpp | 9 +++++-- lib/core/c++/descriptor.hpp | 58 +++++++++++++++++++++++++++++---------------- 2 files changed, 44 insertions(+), 23 deletions(-) (limited to 'lib/core/c++') diff --git a/lib/core/c++/collision.hpp b/lib/core/c++/collision.hpp index 349833f..f259c9f 100644 --- a/lib/core/c++/collision.hpp +++ b/lib/core/c++/collision.hpp @@ -18,12 +18,17 @@ struct BGKGuo {}; template class component { private: - typename saw::native_data_type::type relaxation_; + saw::data relaxation_; saw::data frequency_; public: component(typename saw::native_data_type::type relaxation__): + relaxation_{{relaxation__}}, + frequency_{saw::data{1} / relaxation_} + {} + + component(const saw::data& relaxation__): relaxation_{relaxation__}, - frequency_{typename saw::native_data_type::type(1) / relaxation_} + frequency_{saw::data{1} / relaxation_} {} using Component = cmpt::BGK; diff --git a/lib/core/c++/descriptor.hpp b/lib/core/c++/descriptor.hpp index e38daee..73f0cce 100644 --- a/lib/core/c++/descriptor.hpp +++ b/lib/core/c++/descriptor.hpp @@ -54,6 +54,22 @@ struct CellFieldStruct { template class df_info{}; +/* +namespace impl { +template +struct df_ct_helper { + template + static constexpr uint64_t apply_i(const std::array,Desc::Q>& dirs, const std::array& inp){ + if constexpr ( i < Desc::Q ){ + for(uint64_t j = 0u; j < Desc::D; ++j){ + } + } + return 0u; + } +}; +} +*/ + template class df_info> { public: @@ -214,34 +230,34 @@ public: static constexpr std::array::type,Q> weights = { 8./27., // 1D - 2./27., - 2./27., - // 2D - 2./27., - 1./9., 1./36., 1./36., + // 2D 1./36., + 1./54., + 1./54., 1./36., + 1./54., + 1./54., // 3D - 8./27., - 1./9., - 1./9., - 1./9., - 1./9., - 1./36., - 1./36., 1./36., + 1./54., + 1./54., + 1./54., + 1./216., + 1./216., + 1./54., + 1./216., + 1./216., 1./36., - 8./27., - 1./9., - 1./9., - 1./9., - 1./9., - 1./36., - 1./36., - 1./36., - 1./36. + 1./54., + 1./54., + 1./54., + 1./216., + 1./216., + 1./54., + 1./216., + 1./216. }; static constexpr std::array opposite_index = { -- cgit v1.2.3