diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-07-18 21:45:14 +0200 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-07-18 21:45:14 +0200 |
| commit | 1693f8ccb3fbdbc8a1bd35a5ffde684ca4c68a3f (patch) | |
| tree | 430706084b96d2e7c887ef65bf870e43daffc5bb /modules/core/c++/psm.hpp | |
| parent | 8bc7955f5d95521f7c932b9551a3b71a62117630 (diff) | |
| download | libs-lbm-1693f8ccb3fbdbc8a1bd35a5ffde684ca4c68a3f.tar.gz | |
Dangling
Diffstat (limited to 'modules/core/c++/psm.hpp')
| -rw-r--r-- | modules/core/c++/psm.hpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/core/c++/psm.hpp b/modules/core/c++/psm.hpp index 30a00da..02db1e1 100644 --- a/modules/core/c++/psm.hpp +++ b/modules/core/c++/psm.hpp @@ -8,6 +8,7 @@ namespace kel { namespace lbm { namespace cmpt { struct PSM {}; +struct PsmOneParticle {}; } /** @@ -79,5 +80,29 @@ public: } }; +/** + * PSM collision operator for LBM + */ +template<typename T, typename Descriptor, typename Encode> +class component<T, Descriptor, cmpt::PsmOneParticle, Encode> final { +private: +public: + component() = default; + + template<typename CellFieldSchema, typename MacroFieldSchema, typename ParticleSchema> + void apply(const saw::data<CellFieldSchema, Encode>& field, const saw::data<MacroFieldSchema,Encode>& macros, const saw::data<ParticleSchema,Encode>& particles, saw::data<sch::FixedArray<sch::UInt64,1u>> index, saw::data<sch::UInt64> time_step) const { + + using dfi = df_info<T,Descriptor>; + bool is_even = ((time_step.get() % 2) == 0); + + auto& dfs_old_f = (is_even) ? field.template get<"dfs_old">() : field.template get<"dfs">(); + auto& porous_f = macros.template get<"porosity">(); + + auto& rho_f = macros.template get<"density">(); + auto& vel_f = macros.template get<"velocity">(); + + } +}; + } } |
