summaryrefslogtreecommitdiff
path: root/modules/core/c++/hlbm.hpp
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-08-11 09:56:36 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-08-11 09:56:36 +0200
commit0d15416f60491bd4d17bd8b45a9487c98b8132b0 (patch)
treefd62056148c796b1d8aa29d7c256d63e41404ff4 /modules/core/c++/hlbm.hpp
parent9cc16e97489860ef1989c1bb16745a4dc0155b9f (diff)
parent792e3a52a7e0839905837c031a027b917b36a241 (diff)
downloadlibs-lbm-0d15416f60491bd4d17bd8b45a9487c98b8132b0.tar.gz
Merge branch 'dev'HEADmaster
Diffstat (limited to 'modules/core/c++/hlbm.hpp')
-rw-r--r--modules/core/c++/hlbm.hpp38
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);
- }
-};
}
}