diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-03-09 08:26:01 +0100 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-03-09 08:26:01 +0100 |
| commit | 25b8f0503c56114f097f60db215880416bd187d8 (patch) | |
| tree | 1310dca3d2a9e372ead13d166a57db8cfcbbfe84 /lib/core/c++/boundary.hpp | |
| parent | adc69d0f0065228393b055604bb595510bf9cd60 (diff) | |
| parent | 25c85bf962e0646f8e03f67fd4982450f41ee6a6 (diff) | |
| download | libs-lbm-25b8f0503c56114f097f60db215880416bd187d8.tar.gz | |
Diffstat (limited to 'lib/core/c++/boundary.hpp')
| -rw-r--r-- | lib/core/c++/boundary.hpp | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/lib/core/c++/boundary.hpp b/lib/core/c++/boundary.hpp index 0a4ff4d..9afdfd7 100644 --- a/lib/core/c++/boundary.hpp +++ b/lib/core/c++/boundary.hpp @@ -14,7 +14,10 @@ struct ZouHeHorizontal{}; struct Equilibrium {}; template<bool North> -struct ZouHeVertical{}; +struct ZouHePressureY{}; + +template<bool East> +struct ZouHeVelocityX {}; } /** @@ -135,7 +138,7 @@ public: for(saw::data<sch::UInt64> k{0u}; k < saw::data<sch::UInt64>{Descriptor::Q}; ++k){ auto c_k = dfi::directions[k.get()]; - if(c_k[0u]*known_dir >= 0){ + if(c_k[0u]*known_dir <= 0){ sum_df += dfs_old.at({k}); } } @@ -147,7 +150,7 @@ public: for(saw::data<sch::UInt64> k{0u}; k < saw::data<sch::UInt64>{Descriptor::Q}; ++k){ auto c_k = dfi::directions[k.get()]; - if(c_k[0u]*known_dir > 0){ + if(c_k[0u]*known_dir < 0){ sum_unknown_dfs += dfs_old.at({k}) * c_k[0u]; } } @@ -167,5 +170,30 @@ public: } } }; + +/* +template<typename FP, typename Descriptor, bool East, typename Encode> +class component<FP, Descriptor, cmpt::ZouHeVelocityX<East>, Encode> final { +private: + saw::data<sch::Vector<FP,Descriptor::D>> velocity_; +public: + component( + saw::data<sch::Vector<FP,Descriptor::D>> velocity__ + ): + velocity_{velocity__} + {} + + template<typename CellFieldSchema> + void apply(const saw::data<CellFieldSchema, Encode>& field, const saw::data<sch::FixedArray<sch::UInt64,Descriptor::D>>& index, saw::data<sch::UInt64> time_step) const { + + bool is_even = ((time_step.get() % 2u) == 0u); + using dfi = df_info<FP,Descriptor>; + + auto& dfs_old_f = (is_even) ? field.template get<"dfs_old">() : field.template get<"dfs">(); + + } +}; +*/ + } } |
