diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-08-07 16:14:16 +0200 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-08-07 16:14:16 +0200 |
| commit | cf3ee2ab8de44160c24da7850955021142f41da8 (patch) | |
| tree | 2f8ea947c00208bf986c7778fa7a441ea64bd23e /modules/core/c++/descriptor.hpp | |
| parent | 1f797c2f9716c5b604dc6eee8335d9149d4a0b77 (diff) | |
| download | libs-lbm-cf3ee2ab8de44160c24da7850955021142f41da8.tar.gz | |
Clean up descriptors
Diffstat (limited to 'modules/core/c++/descriptor.hpp')
| -rw-r--r-- | modules/core/c++/descriptor.hpp | 74 |
1 files changed, 3 insertions, 71 deletions
diff --git a/modules/core/c++/descriptor.hpp b/modules/core/c++/descriptor.hpp index ed64a0f..ac09e7b 100644 --- a/modules/core/c++/descriptor.hpp +++ b/modules/core/c++/descriptor.hpp @@ -4,7 +4,10 @@ #include <forstio/codec/data_math.hpp> #include <forstio/codec/schema_factory.hpp> +#include "descriptor/d1q3.hpp" +#include "descriptor/d2q5.hpp" #include "descriptor/d2q9.hpp" +#include "descriptor/d3q19.hpp" #include "descriptor/d3q27.hpp" namespace kel { @@ -12,9 +15,6 @@ namespace lbm { namespace sch { using namespace saw::schema; -//using D2Q5 = Descriptor<2u,5u>; -using D3Q27 = Descriptor<3u,27u>; - template<typename Sch, typename Desc, uint64_t SC_V, uint64_t DC_V, uint64_t QC_V> struct Cell { using Descriptor = Desc; @@ -63,74 +63,6 @@ struct df_ct_helper { } */ -template<typename T> -class df_info<T,sch::Descriptor<1,3>> { -public: - using Descriptor = sch::Descriptor<1,3>; - - static constexpr uint64_t D = 1u; - static constexpr uint64_t Q = 3u; - - static constexpr std::array<std::array<int32_t,D>,Q> directions = {{ - { 0}, - {-1}, - { 1} - }}; - - static constexpr std::array<typename saw::native_data_type<T>::type, Q> weights = { - 2./3., - 1./6., - 1./6. - }; - - static constexpr std::array<uint64_t,Q> opposite_index = { - 0,2,1 - }; - - static constexpr typename saw::native_data_type<T>::type inv_cs2 = 3.0; - static constexpr typename saw::native_data_type<T>::type cs2 = 1./3.; -}; - -/** - * D2Q5 Descriptor - */ -template<typename T> -class df_info<T,sch::Descriptor<2, 5>> { -public: - using Descriptor = sch::Descriptor<2,5>; - - static constexpr uint64_t D = 2u; - static constexpr uint64_t Q = 5u; - - static constexpr std::array<std::array<int32_t, D>, Q> directions = {{ - { 0, 0}, - {-1, 0}, - { 1, 0}, - { 0,-1}, - { 0, 1}, - }}; - - static constexpr std::array<typename saw::native_data_type<T>::type,Q> weights = { - 1./3., - 1./6., - 1./6., - 1./6., - 1./6. - }; - - static constexpr std::array<uint64_t,Q> opposite_index = { - 0, - 2, - 1, - 4, - 3 - }; - - static constexpr typename saw::native_data_type<T>::type inv_cs2 = 3.0; - static constexpr typename saw::native_data_type<T>::type cs2 = 1./3.; -}; - - template<typename Schema> class cell_schema_builder { private: |
