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 --- .../poiseulle_particles_channel_2d.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'examples/poiseulle_particles_channel_2d') diff --git a/examples/poiseulle_particles_channel_2d/poiseulle_particles_channel_2d.cpp b/examples/poiseulle_particles_channel_2d/poiseulle_particles_channel_2d.cpp index e38710a..5ae3a11 100644 --- a/examples/poiseulle_particles_channel_2d/poiseulle_particles_channel_2d.cpp +++ b/examples/poiseulle_particles_channel_2d/poiseulle_particles_channel_2d.cpp @@ -347,10 +347,9 @@ void couple_particles_to_lattice( } saw::data> mask_shift; - { + for(uint64_t i = 0u; i < sch::D2Q9::D; ++i){ // Technically rotate and adjust here - mask_shift.at({{0u}}) = index_shift.at({{0u}}); - mask_shift.at({{1u}}) = index_shift.at({{1u}}); + mask_shift.at({{i}}) = index_shift.at({{i}}); } auto p_pos_lie = p_pos + mask_shift; -- cgit v1.2.3