summaryrefslogtreecommitdiff
path: root/examples/poiseulle_particles_channel_2d/poiseulle_particles_channel_2d.cpp
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2025-10-05 19:53:13 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2025-10-05 19:53:13 +0200
commit8ff7003d3016b9e0295150aa4f91804eb00677fc (patch)
tree392b283ca1c63808359576229760d2e8732194fa /examples/poiseulle_particles_channel_2d/poiseulle_particles_channel_2d.cpp
parent691079df271fc5116f435496d0646c67e8a73701 (diff)
downloadlibs-lbm-8ff7003d3016b9e0295150aa4f91804eb00677fc.tar.gz
Center of mass calculation for grid
Diffstat (limited to 'examples/poiseulle_particles_channel_2d/poiseulle_particles_channel_2d.cpp')
-rw-r--r--examples/poiseulle_particles_channel_2d/poiseulle_particles_channel_2d.cpp5
1 files changed, 2 insertions, 3 deletions
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<sch::Vector<sch::T,2u>> 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;