From 7baa3bd901da034aa29e3e6836b8ddecf07b1129 Mon Sep 17 00:00:00 2001 From: PhilipDeegan Date: Sat, 2 Nov 2024 00:17:00 +0100 Subject: [PATCH] ++ --- src/core/data/particles/arrays/particle_array_pc.hpp | 11 ++++++----- .../core/numerics/ion_updater/test_multi_updater.cpp | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/core/data/particles/arrays/particle_array_pc.hpp b/src/core/data/particles/arrays/particle_array_pc.hpp index 856a83dfb..1058a2f6e 100644 --- a/src/core/data/particles/arrays/particle_array_pc.hpp +++ b/src/core/data/particles/arrays/particle_array_pc.hpp @@ -866,12 +866,13 @@ struct PerCellParticles : public Super_ { using Op = Operators; - auto const nc = Super::local_cell(newcell); - // printf("L:%d i %llu ic %u,%u change \n", __LINE__, idx, cell[0], cell[1]); - - Op{Super::add_into_(nc)}.increment_return_old(); - Super::gaps_(cell)[Op{Super::gap_idx_(cell)}.increment_return_old()] = idx; + if (isIn(newcell, Super::ghost_box())) + { + auto const nc = Super::local_cell(newcell); + Op{Super::add_into_(nc)}.increment_return_old(); + Super::gaps_(cell)[Op{Super::gap_idx_(cell)}.increment_return_old()] = idx; + } } else throw std::runtime_error("no"); diff --git a/tests/core/numerics/ion_updater/test_multi_updater.cpp b/tests/core/numerics/ion_updater/test_multi_updater.cpp index 46973cebb..901c23295 100644 --- a/tests/core/numerics/ion_updater/test_multi_updater.cpp +++ b/tests/core/numerics/ion_updater/test_multi_updater.cpp @@ -9,7 +9,7 @@ #include "core/numerics/ion_updater/ion_updater_def.hpp" -// #define PHARE_UNDEF_ASSERT +#define PHARE_UNDEF_ASSERT #define PHARE_SKIP_MPI_IN_CORE #include