diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-08-11 09:56:17 +0200 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-08-11 09:56:17 +0200 |
| commit | 792e3a52a7e0839905837c031a027b917b36a241 (patch) | |
| tree | fd62056148c796b1d8aa29d7c256d63e41404ff4 /modules/core/c++/hlbm.hpp | |
| parent | 15ee0a4a9b398b86001c7a2542e8e98f9dedba70 (diff) | |
| download | libs-lbm-792e3a52a7e0839905837c031a027b917b36a241.tar.gz | |
Danglingdev
Diffstat (limited to 'modules/core/c++/hlbm.hpp')
| -rw-r--r-- | modules/core/c++/hlbm.hpp | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/modules/core/c++/hlbm.hpp b/modules/core/c++/hlbm.hpp index fc19728..cc21dcf 100644 --- a/modules/core/c++/hlbm.hpp +++ b/modules/core/c++/hlbm.hpp @@ -234,43 +234,5 @@ public: } } }; - -template<typename T, typename Desc, typename Encode> -class component<T, Desc, cmpt::HlbmOneParticleMomentumExchange, Encode> final { -public: - template<typename CellFieldSchema, typename MacroFieldSchema> - void apply(const saw::data<CellFieldSchema, Encode>& field, const saw::data<MacroFieldSchema,Encode>& macros, saw::data<sch::FixedArray<sch::UInt64,Desc::D>> index, saw::data<sch::UInt64> time_step) const { - // - using dfi = df_info<T,Desc>; - bool is_even = ((time_step.get() % 2) == 0); - - auto& dfs_old_f = (is_even) ? field.template get<"dfs_old">() : field.template get<"dfs">(); - auto& dfs = dfs_old_f.at(index); - - saw::data<sch::Vector<T,Desc::D>> momentum; - for(uint64_t i = 0u; i < Desc::Q; ++i){ - - saw::data<sch::Vector<T,Desc::D>> e_i; - saw::data<sch::FixedArray<sch::UInt64,Desc::D>> n_ind_i; - for(uint64_t k{0u}; k < Desc::D; ++k){ - e_i.at({{k}}) = dfi::directions[i][k]; - n_ind_i.at({k}) = (dfi::directions[i])[k]; - } - - uint64_t i_opp = dfi::opposite_index[i]; - - saw::data<T> dfs_added = dfs.at({i}) - dfs_old_f.at(n_ind_i).at({i_opp}); - saw::data<sch::Scalar<T>> dfs_added_v; - dfs_added_v.at({}) = dfs_added; - auto ei_dfs = e_i * dfs_added_v; - - momentum = momentum + ei_dfs; - } - auto& force_f = macros.template get<"force">(); - - // Set Force - force_f.at(index) = momentum * macros.template get<"porosity">().at(index); - } -}; } } |
