diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-02-04 10:44:40 +0100 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-02-04 10:44:40 +0100 |
| commit | 2ae8aaa474f888ed7a5a3810cd916977df6d0dcf (patch) | |
| tree | 688d653943d07f4b0d65e2b46142c2495ed9e08b /lib/core/c++/stream.hpp | |
| parent | de842630138b198bc80dfd50d221df86a0139a35 (diff) | |
| download | libs-lbm-2ae8aaa474f888ed7a5a3810cd916977df6d0dcf.tar.gz | |
Work on vtk write and added some vars
Diffstat (limited to 'lib/core/c++/stream.hpp')
| -rw-r--r-- | lib/core/c++/stream.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/core/c++/stream.hpp b/lib/core/c++/stream.hpp index d217373..8c0342b 100644 --- a/lib/core/c++/stream.hpp +++ b/lib/core/c++/stream.hpp @@ -18,7 +18,18 @@ public: template<typename CellFieldSchema> void apply(const saw::data<CellFieldSchema, Encode>& field, const saw::data<sch::FixedArray<sch::UInt64,Descriptor::D>>& index, saw::data<sch::UInt64> 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})); + } } }; } |
