diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-07-05 15:59:23 +0200 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-07-05 15:59:23 +0200 |
| commit | c0549d71b2109f10c1238db8b22362e7826ba61b (patch) | |
| tree | 16cd5264fcc3afe912e1b1b67738c8940d6d1177 /lib/core/c++/macroscopic.hpp | |
| parent | 9a3147bc79caf3c0fb1a9cdee29d156b5ff092c7 (diff) | |
| download | libs-lbm-c0549d71b2109f10c1238db8b22362e7826ba61b.tar.gz | |
Just rename from lib to modules
Diffstat (limited to 'lib/core/c++/macroscopic.hpp')
| -rw-r--r-- | lib/core/c++/macroscopic.hpp | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/lib/core/c++/macroscopic.hpp b/lib/core/c++/macroscopic.hpp deleted file mode 100644 index 19ab3e9..0000000 --- a/lib/core/c++/macroscopic.hpp +++ /dev/null @@ -1,36 +0,0 @@ -#pragma once - -#include "descriptor.hpp" - -namespace kel { -namespace lbm { -/** - * Calculate the macroscopic variables rho and u in Lattice Units. - */ -template<typename T, typename Desc> -void compute_rho_u ( - const saw::data<sch::FixedArray<T,Desc::Q>>& dfs, - saw::ref<saw::data<sch::Scalar<T>>> rho, - saw::ref<saw::data<sch::Vector<T,Desc::D>>> vel - ) -{ - using dfi = df_info<T, Desc>; - - rho().at({}).set(0); - for(uint64_t i = 0; i < Desc::D; ++i){ - vel().at({{i}}).set(0); - } - - for(size_t j = 0; j < Desc::Q; ++j){ - rho().at({}) = rho().at({}) + dfs.at({j}); - for(size_t i = 0; i < Desc::D; ++i){ - vel().at({{i}}) = vel().at({{i}}) + saw::data<T>{static_cast<typename saw::native_data_type<T>::type>(dfi::directions[j][i])} * dfs.at({j}); - } - } - - for(size_t i = 0; i < Desc::D; ++i){ - vel().at({{i}}) = vel().at({{i}}) / rho().at({}); - } -} -} -} |
