From 8ff7003d3016b9e0295150aa4f91804eb00677fc Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Sun, 5 Oct 2025 19:53:13 +0200 Subject: Center of mass calculation for grid --- c++/particle/geometry/circle.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'c++/particle/geometry/circle.hpp') diff --git a/c++/particle/geometry/circle.hpp b/c++/particle/geometry/circle.hpp index 069a1a5..ef67fdd 100644 --- a/c++/particle/geometry/circle.hpp +++ b/c++/particle/geometry/circle.hpp @@ -17,6 +17,7 @@ public: saw::data> mask; auto& grid = mask.template get<"grid">(); + auto& com = mask.template get<"center_of_mass">(); //uint64_t rad_i = static_cast(resolution * radius_.get())+1u; uint64_t rad_i = resolution; @@ -41,6 +42,11 @@ public: } } + saw::data> com{{0,0}}; + iterate_over([&](saw::data>& index){ + + },{{0u,0u}}, grid.meta()); + return mask; } }; -- cgit v1.2.3