From: Martin Kronbichler Date: Wed, 9 Jun 2021 13:44:33 +0000 (+0200) Subject: Minor simplification in particle accessor X-Git-Tag: v9.4.0-rc1~1243^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F12421%2Fhead;p=dealii.git Minor simplification in particle accessor --- diff --git a/include/deal.II/particles/particle_accessor.h b/include/deal.II/particles/particle_accessor.h index 855baa9ea0..e1f805097b 100644 --- a/include/deal.II/particles/particle_accessor.h +++ b/include/deal.II/particles/particle_accessor.h @@ -713,7 +713,7 @@ namespace Particles ++particle_index_within_cell; - if (particle_index_within_cell > (*particles)[active_cell_index].size() - 1) + if (particle_index_within_cell >= (*particles)[active_cell_index].size()) { const bool particle_is_locally_owned = cell->is_locally_owned(); @@ -725,7 +725,7 @@ namespace Particles ++active_cell_index; } while (cell.state() == IteratorState::valid && - ((*particles)[active_cell_index].size() == 0 || + ((*particles)[active_cell_index].empty() || cell->is_locally_owned() != particle_is_locally_owned)); } }