From 4963e6a6f1d1c1f0482e143268a2053ed26cc047 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Mon, 17 Aug 2026 09:08:01 +0200 Subject: Thinking how to do it --- modules/core/c++/descriptor/d2q4.hpp | 48 ++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 modules/core/c++/descriptor/d2q4.hpp (limited to 'modules/core') diff --git a/modules/core/c++/descriptor/d2q4.hpp b/modules/core/c++/descriptor/d2q4.hpp new file mode 100644 index 0000000..e867bbc --- /dev/null +++ b/modules/core/c++/descriptor/d2q4.hpp @@ -0,0 +1,48 @@ +#pragma once + +#include "common.hpp" + +namespace kel { +namespace lbm { +namespace sch { +using D2Q5 = Descriptor<2u,4u>; +} + +template +class df_info> { +public: + using Descriptor = sch::Descriptor<2,4>; + + static constexpr uint64_t D = 2u; + static constexpr uint64_t Q = 4u; + + static constexpr std::array, Q> directions = {{ + { 0, 0}, // 0 + {-1, 0}, // 1 + { 1, 0}, // 2 + { 0,-1}, // 3 + }}; + + static constexpr std::array::type,Q> weights = { + 1./3., + 1./6., + 1./6., + 1./6. + }; + + /* + static constexpr std::array opposite_index = { + 0, + 2, + 1, + 3 + }; + */ + + static constexpr typename saw::native_data_type::type inv_cs2 = 3.0; + static constexpr typename saw::native_data_type::type cs2 = 1./3.; +}; + + +} +} -- cgit v1.2.3 From 5ba7e8470f29f96ea0a12a78b3d97091fe69a581 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Mon, 17 Aug 2026 22:26:02 +0200 Subject: Fix things --- modules/core/c++/boundary.hpp | 2 +- modules/core/c++/psm.hpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'modules/core') diff --git a/modules/core/c++/boundary.hpp b/modules/core/c++/boundary.hpp index e7567c9..8312584 100644 --- a/modules/core/c++/boundary.hpp +++ b/modules/core/c++/boundary.hpp @@ -12,7 +12,7 @@ template struct AntiBounceBack {}; template -struct ZouHeHorizontal{}; +struct ZouHeVelocityX{}; struct Equilibrium {}; diff --git a/modules/core/c++/psm.hpp b/modules/core/c++/psm.hpp index 2daff5e..1dca64b 100644 --- a/modules/core/c++/psm.hpp +++ b/modules/core/c++/psm.hpp @@ -11,6 +11,9 @@ struct PsmReset {}; struct PsmOneParticle {}; struct Psm {}; } +namespace method { +struct Psm {}; +} template class component final { -- cgit v1.2.3