From ff702d3c9427794c5557360c53b93f9861f97554 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Mon, 22 Jun 2026 17:36:51 +0200 Subject: Dangling --- examples/poiseulle_particles_2d_gpu/step.hpp | 8 +++++++- lib/core/c++/hlbm.hpp | 1 + lib/core/c++/particle/aabb.hpp | 4 +++- lib/core/tests/particles.cpp | 6 ++++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/examples/poiseulle_particles_2d_gpu/step.hpp b/examples/poiseulle_particles_2d_gpu/step.hpp index 52e8c59..aa0e382 100644 --- a/examples/poiseulle_particles_2d_gpu/step.hpp +++ b/examples/poiseulle_particles_2d_gpu/step.hpp @@ -18,10 +18,11 @@ saw::error_or step( auto& info_f = fields.template get<"info">(); auto& porous_f = macros.template get<"porosity">(); + component> particle; + // auto coll_ev = q.submit([&](acpp::sycl::handler& h){ component> collision{0.8}; - component> particle; component> bb; component,encode::Sycl> abb; @@ -76,6 +77,11 @@ saw::error_or step( }); }).wait(); + q.submit([&](acpp::sycl::handler& h){ + h.parallel_for(acpp::sycl::range<1u>{1u}, [=](acpp::sycl::id<1u> idx){ + particle.apply(fields,macros,particles,{{0u}},t_i); + }); + }).wait(); // Step /* diff --git a/lib/core/c++/hlbm.hpp b/lib/core/c++/hlbm.hpp index 85e5357..0ba9cc2 100644 --- a/lib/core/c++/hlbm.hpp +++ b/lib/core/c++/hlbm.hpp @@ -142,6 +142,7 @@ public: iterator::apply([&](const auto& index){ // ask for the d_k value here. // For every value im iterating over I need sth + std::cout<<"Pos: "< class particle_aabb final { + static_assert(saw::always_false::value, "Not supported"); }; template @@ -21,7 +22,8 @@ public: sch::Member,"b"> >; public: - static constexpr saw::data calculate(const saw::data& p_grp, const saw::data>& i, const saw::data>& meta){ + template + static constexpr saw::data calculate(const saw::data& p_grp, const saw::data>& i, const saw::data>& meta){ saw::data aabb; auto& parts = p_grp.template get<"particles">(); diff --git a/lib/core/tests/particles.cpp b/lib/core/tests/particles.cpp index 1c18fbb..de9477c 100644 --- a/lib/core/tests/particles.cpp +++ b/lib/core/tests/particles.cpp @@ -272,4 +272,10 @@ SAW_TEST("Verlet integration test 2D"){ } } */ + +SAW_TEST("Particle / AABB"){ + using namespace kel; + + +} } -- cgit v1.2.3