From 80c80b4659877f6f87b264e103e68fbddb12a612 Mon Sep 17 00:00:00 2001 From: Bruno Date: Wed, 9 Jun 2021 10:14:39 -0400 Subject: [PATCH] FIx cell type that is checked --- include/deal.II/particles/particle_accessor.h | 1 - source/particles/particle_handler.cc | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/deal.II/particles/particle_accessor.h b/include/deal.II/particles/particle_accessor.h index 3e6a860797..855baa9ea0 100644 --- a/include/deal.II/particles/particle_accessor.h +++ b/include/deal.II/particles/particle_accessor.h @@ -713,7 +713,6 @@ namespace Particles ++particle_index_within_cell; - if (particle_index_within_cell > (*particles)[active_cell_index].size() - 1) { const bool particle_is_locally_owned = cell->is_locally_owned(); diff --git a/source/particles/particle_handler.cc b/source/particles/particle_handler.cc index 07ff750412..3cbddcf6d7 100644 --- a/source/particles/particle_handler.cc +++ b/source/particles/particle_handler.cc @@ -1310,7 +1310,7 @@ namespace Particles #else // Clear ghost particles and their properties for (const auto &cell : triangulation->active_cell_iterators()) - if (cell->is_locally_owned() == false) + if (cell->is_ghost()) { // Clear particle properties for (auto &ghost_particle : particles[cell->active_cell_index()]) -- 2.39.5