diff options
Diffstat (limited to 'c++')
-rw-r--r-- | c++/descriptor.hpp | 3 | ||||
-rw-r--r-- | c++/macroscopic.hpp | 12 |
2 files changed, 10 insertions, 5 deletions
diff --git a/c++/descriptor.hpp b/c++/descriptor.hpp index aa8c943..b1ee5b1 100644 --- a/c++/descriptor.hpp +++ b/c++/descriptor.hpp @@ -1,6 +1,7 @@ #pragma once #include <forstio/codec/data.hpp> +#include <forstio/codec/schema_factory.hpp> namespace kel { namespace lbm { @@ -164,10 +165,12 @@ public: factory_struct_{inp} {} + /* template<typename TA, saw::string_literal KA> constexpr auto require() const noexcept { return {factory_struct_.add_maybe()}; } + */ }; } diff --git a/c++/macroscopic.hpp b/c++/macroscopic.hpp index 608b89e..43c727b 100644 --- a/c++/macroscopic.hpp +++ b/c++/macroscopic.hpp @@ -1,18 +1,20 @@ #pragma once +#include "descriptor.hpp" + namespace kel { namespace lbm { /** * Calculate the macroscopic variables rho and u in Lattice Units. */ -template<typename Desc> +template<typename T, typename Desc> void compute_rho_u ( - const saw::data<sch::DfCell<Desc>>& dfs, - typename saw::native_data_type<sch::T>::type& rho, - std::array<typename saw::native_data_type<sch::T>::type, 2>& vel + saw::data<sch::Cell<T, Desc, 0, 0, 1>>& dfs, + typename saw::native_data_type<T>::type& rho, + std::array<typename saw::native_data_type<T>::type, 2>& vel ) { - using dfi = df_info<sch::T, Desc>; + using dfi = df_info<T, Desc>; rho = 0; std::fill(vel.begin(), vel.end(), 0); |