summaryrefslogtreecommitdiff
path: root/c++/collision.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'c++/collision.hpp')
-rw-r--r--c++/collision.hpp17
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">();
+
}
};