summaryrefslogtreecommitdiff
path: root/lib/core/c++
diff options
context:
space:
mode:
Diffstat (limited to 'lib/core/c++')
-rw-r--r--lib/core/c++/chunk.hpp38
-rw-r--r--lib/core/c++/common.hpp11
-rw-r--r--lib/core/c++/descriptor.hpp4
-rw-r--r--lib/core/c++/lbm.hpp3
4 files changed, 53 insertions, 3 deletions
diff --git a/lib/core/c++/chunk.hpp b/lib/core/c++/chunk.hpp
new file mode 100644
index 0000000..bfef358
--- /dev/null
+++ b/lib/core/c++/chunk.hpp
@@ -0,0 +1,38 @@
+#pragma once
+
+#include "common.hpp"
+
+namespace kel {
+namespace lbm {
+namespace sch {
+namespace impl {
+template<typename Sch, uint64_t Dim, uint64_t Side, typename... AddedSides>
+struct chunk_schema_type_helper {
+ using Schema = typename chunk_schema_type_helper<Sch,Dim-1u,Side,AddedSides...,Side>::Schema;
+};
+
+template<typename Sch, uint64_t Side, typename... AddedSides>
+struct chunk_schema_type_helper<Sch, 0u, Side, AddedSides...> {
+ using Schema = FixedArray<Sch,AddedSides...>;
+};
+}
+
+
+template<typename Schema, uint64_t Dim, uint64_t Side, uint64_t Ghost = 0u>
+struct Chunk {
+ using InnerSchema = typename impl::chunk_schema_type_helper<Sch, Dim, Side + (2u*Ghost)>::Schema;
+};
+
+template<typename ChunkSchema, uint64_t Dim>
+using SuperChunk = Array<ChunkSchema,Dim>;
+}
+}
+}
+
+namespace saw {
+template<typename Sch, uint64_t Dim, uint64_t Side, uint64_t Ghost, typename Encode>
+class data<kel::lbm::sch::Chunk<Sch,Dim,Side,Ghost>,Encode> final {
+private:
+public:
+};
+}
diff --git a/lib/core/c++/common.hpp b/lib/core/c++/common.hpp
new file mode 100644
index 0000000..5f7129f
--- /dev/null
+++ b/lib/core/c++/common.hpp
@@ -0,0 +1,11 @@
+#pragma once
+
+#include <forstio/codec/data.hpp>
+
+namespace kel {
+namespace lbm {
+namespace sch {
+using namespace saw::schema;
+}
+}
+}
diff --git a/lib/core/c++/descriptor.hpp b/lib/core/c++/descriptor.hpp
index c6938e3..9cc2591 100644
--- a/lib/core/c++/descriptor.hpp
+++ b/lib/core/c++/descriptor.hpp
@@ -15,6 +15,10 @@ struct Descriptor {
static constexpr uint64_t Q = QV;
};
+using D2Q9 = Descriptor<2u,9u>;
+//using D2Q5 = Descriptor<2u,5u>;
+using D3Q27 = Descriptor<3u,27u>;
+
template<typename Sch, typename Desc, uint64_t SC_V, uint64_t DC_V, uint64_t QC_V>
struct Cell {
using Descriptor = Desc;
diff --git a/lib/core/c++/lbm.hpp b/lib/core/c++/lbm.hpp
index 473ca69..aff38e9 100644
--- a/lib/core/c++/lbm.hpp
+++ b/lib/core/c++/lbm.hpp
@@ -19,9 +19,6 @@
#include <iostream>
namespace kel {
-namespace sch {
-using namespace saw::schema;
-}
namespace lbm {
template<typename T, typename Desc>
void print_lbm_meta(const converter<T>& conv, const saw::data<sch::SiKinematicViscosity<T>>& kin_vis_si){