summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2025-10-31 14:25:09 +0100
committerClaudius "keldu" Holeksa <mail@keldu.de>2025-10-31 14:25:09 +0100
commitdb81d74c3959fded1c32fe4e95f2efeed04938ee (patch)
tree766e618aee8eeff4ac2f7d6c9825df44b0803f83 /lib
parent1f6047e53ceee403341b11075d915b77fa0bbcc2 (diff)
downloadlibs-lbm-db81d74c3959fded1c32fe4e95f2efeed04938ee.tar.gz
Adding 3D poiseulle and using http fetching
Diffstat (limited to 'lib')
-rw-r--r--lib/c++/boundary.hpp8
-rw-r--r--lib/c++/collision.hpp10
-rw-r--r--lib/c++/descriptor.hpp3
3 files changed, 12 insertions, 9 deletions
diff --git a/lib/c++/boundary.hpp b/lib/c++/boundary.hpp
index 5cc7705..c10784c 100644
--- a/lib/c++/boundary.hpp
+++ b/lib/c++/boundary.hpp
@@ -44,8 +44,8 @@ public:
* Raw setup
*/
template<typename CellFieldSchema>
- void apply(saw::data<CellFieldSchema, Encode>& field, const saw::data<sch::FixedArray<sch::UInt64,Descriptor::D>>& index, uint64_t time_step){
- bool is_even = ((time_step % 2u) == 0u);
+ void apply(saw::data<CellFieldSchema, Encode>& field, const saw::data<sch::FixedArray<sch::UInt64,Descriptor::D>>& index, saw::data<sch::UInt64> time_step){
+ bool is_even = ((time_step.get() % 2u) == 0u);
// This is a ref
auto& cell = field(index);
@@ -88,10 +88,10 @@ public:
{}
template<typename CellFieldSchema>
- void apply(saw::data<CellFieldSchema, Encode>& field, saw::data<sch::FixedArray<sch::UInt64,Descriptor::D>> index, uint64_t time_step){
+ void apply(saw::data<CellFieldSchema, Encode>& field, saw::data<sch::FixedArray<sch::UInt64,Descriptor::D>> index, saw::data<sch::UInt64> time_step){
using dfi = df_info<FP,Descriptor>;
- bool is_even = ((time_step % 2) == 0);
+ bool is_even = ((time_step.get() % 2) == 0);
auto& cell = field(index);
auto& info = cell.template get<"info">();
diff --git a/lib/c++/collision.hpp b/lib/c++/collision.hpp
index 9ab542b..73e86ae 100644
--- a/lib/c++/collision.hpp
+++ b/lib/c++/collision.hpp
@@ -45,9 +45,9 @@ public:
* Raw setup
*/
template<typename CellFieldSchema>
- void apply(saw::data<CellFieldSchema, Encode>& field, saw::data<sch::FixedArray<sch::UInt64,Descriptor::D>> index, uint64_t time_step){
- bool is_even = ((time_step % 2) == 0);
- auto& cell = field(index);
+ void apply(saw::data<CellFieldSchema, Encode>& field, saw::data<sch::FixedArray<sch::UInt64,Descriptor::D>> index, saw::data<sch::UInt64> time_step){
+ bool is_even = ((time_step.get() % 2) == 0);
+ auto& cell = field.at(index);
auto& dfs_old = (is_even) ? cell.template get<"dfs_old">() : cell.template get<"dfs">();
// auto& dfs = (not is_even) ? cell.template get<"dfs_old">() : cell.template get<"dfs">();
@@ -90,8 +90,8 @@ public:
static constexpr saw::string_literal before = "streaming";
template<typename CellFieldSchema>
- void apply(saw::data<CellFieldSchema, Encode>& field, saw::data<sch::FixedArray<sch::UInt64, Descriptor::D>> index, uint64_t time_step){
- bool is_even = ((time_step % 2) == 0);
+ void apply(saw::data<CellFieldSchema, Encode>& field, saw::data<sch::FixedArray<sch::UInt64, Descriptor::D>> index, saw::data<sch::UInt64> time_step){
+ bool is_even = ((time_step.get() % 2) == 0);
auto& cell = field(index);
auto& dfs_old = (is_even) ? cell.template get<"dfs_old">() : cell.template get<"dfs">();
diff --git a/lib/c++/descriptor.hpp b/lib/c++/descriptor.hpp
index 1e3402f..c6938e3 100644
--- a/lib/c++/descriptor.hpp
+++ b/lib/c++/descriptor.hpp
@@ -311,6 +311,9 @@ public:
}
};
+/*
+ * Create a cellfield
+ */
template<typename Desc, typename CellT, typename Encode>
class data<kel::lbm::sch::CellField<Desc, CellT>, Encode> final {
public: