diff options
author | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-04-16 16:49:14 +0200 |
---|---|---|
committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-04-16 16:49:14 +0200 |
commit | 2e6ae2ef9bb230930f5213c256e624080b08faca (patch) | |
tree | 57487c10ea5787798ad707be8e7a274a87eace43 /c++/collision.hpp | |
parent | 24827b7753fcdc6c837301064afe60e3d1df3145 (diff) |
Trying to make a cleaner vtk writer
Diffstat (limited to 'c++/collision.hpp')
-rw-r--r-- | c++/collision.hpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/c++/collision.hpp b/c++/collision.hpp index 87187c2..ba35be1 100644 --- a/c++/collision.hpp +++ b/c++/collision.hpp @@ -14,15 +14,30 @@ class component<T, Descriptor, cmpt::BGK> { public: using Component = cmpt::BGK; + /** + * Thoughts regarding automating order setup + */ using access = cmpt::access_tuple< cmpt::access<"dfs", 1, true, true, true> >; + /** + * Thoughts regarding automating order setup + */ static constexpr saw::string_literal name = "collision"; static constexpr saw::string_literal after = ""; static constexpr saw::string_literal before = "streaming"; - void apply(saw::data<sch::CellField>& field){ + /** + * Raw setup + */ + void apply(saw::data<sch::CellField>& field, saw::data<sch::FixedArray<sch::UInt64,Descriptor::D>> index, uint64_t time_step){ + bool is_even = ((time_step % 2) == 0); + auto& cell = field.at(index); + + auto& dfs_old = is_even ? cell.template get<"dfs_old">() : cell.template get<"dfs">(); + auto& dfs = (!is_even) ? cell.template get<"dfs_old">() : cell.template get<"dfs">(); + } }; |