summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-04-16 16:20:23 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-04-16 16:20:23 +0200
commitd01f8faadcec62593e0af5304bcc2db3d22ed0c5 (patch)
tree968adf2716f8b7536fbfe983505ea53dc59d2b55 /lib
parente19b4c91cfc7c370851c73314f54ef3e479b45bc (diff)
downloadlibs-lbm-d01f8faadcec62593e0af5304bcc2db3d22ed0c5.tar.gz
Brain fried
Diffstat (limited to 'lib')
-rw-r--r--lib/core/c++/particle.hpp5
-rw-r--r--lib/sycl/c++/data.hpp16
2 files changed, 21 insertions, 0 deletions
diff --git a/lib/core/c++/particle.hpp b/lib/core/c++/particle.hpp
index b098ecc..691a74b 100644
--- a/lib/core/c++/particle.hpp
+++ b/lib/core/c++/particle.hpp
@@ -11,7 +11,12 @@ struct Particle {};
template<typename T, typename Descriptor, typename Encode>
class component<T, Descriptor, cmpt::Particle, Encode> {
+private:
+ saw::data<sch::Scalar<T>> dt_;
public:
+ component(saw::data<sch::Scalar<T>> dt__):
+ dt_{dt__}
+ {}
template<typename ParticleSchema, typename MacroFieldSchema>
void apply(const saw::data<ParticleSchema, Encode>& particles, const saw::data<MacroFieldSchema,Encode>& macros, saw::data<sch::UInt64> index, saw::data<sch::UInt64> time_step) const {
diff --git a/lib/sycl/c++/data.hpp b/lib/sycl/c++/data.hpp
index 0206833..71627de 100644
--- a/lib/sycl/c++/data.hpp
+++ b/lib/sycl/c++/data.hpp
@@ -278,6 +278,10 @@ public:
return data<InnerSchema,kel::lbm::encode::Sycl<Encode>>::get_dims();
}
+ static constexpr auto ghost_meta() {
+ return data<InnerSchema,kel::lbm::encode::Sycl<Encode>>::meta();
+ }
+
data<ValueSchema, Encode>& at(const data<schema::FixedArray<schema::UInt64,sizeof...(Sides)>>& index){
std::decay_t<decltype(index)> ind;
for(uint64_t i = 0u; i < sizeof...(Sides); ++i){
@@ -298,6 +302,10 @@ public:
return data<schema::FixedArray<schema::UInt64, sizeof...(Sides)>,Encode>{{Sides...}};
}
+ static constexpr auto meta(){
+ return data<schema::FixedArray<schema::UInt64, sizeof...(Sides)>,Encode>{{Sides...}};
+ }
+
auto flat_data() const {
return values_.flat_data();
}
@@ -345,6 +353,10 @@ public:
return data<InnerSchema,kel::lbm::encode::Sycl<Encode>>::get_dims();
}
+ static constexpr auto ghost_meta() {
+ return data<InnerSchema,kel::lbm::encode::Sycl<Encode>>::meta();
+ }
+
data<ValueSchema, Encode>& at(const data<schema::FixedArray<schema::UInt64,sizeof...(Sides)>>& index){
std::decay_t<decltype(index)> ind;
for(uint64_t i = 0u; i < sizeof...(Sides); ++i){
@@ -361,6 +373,10 @@ public:
return values_.at(ind);
}
+ static constexpr auto meta(){
+ return data<schema::FixedArray<schema::UInt64, sizeof...(Sides)>,Encode>{{Sides...}};
+ }
+
static constexpr auto get_dims(){
return data<schema::FixedArray<schema::UInt64, sizeof...(Sides)>,Encode>{{Sides...}};
}