#pragma once #include "component.hpp" namespace kel { namespace lbm { namespace cmpt { struct Stream {}; } template class component final { private: public: static constexpr saw::string_literal name = "streaming"; static constexpr saw::string_literal after = "collide"; static constexpr saw::string_literal before = ""; template void apply(const saw::data& field, const saw::data>& index, saw::data time_step) const { bool is_even = ((time_step.get() % 2) == 0); auto& dfs_old_f = (is_even) ? field.template get<"dfs_old">() : field.template get<"dfs">(); auto info_f = field.template get<"info">(); auto info_meta = info_f.get_dims(); bool border = false; for(uint64_t i = 0u; i < Descriptor::D; ++i){ auto ind_i = index.at({i}); border |= (ind_i.get()) == 0u or (ind_i == info_meta.at({i})); } } }; } }