From 6465c72e70a25908af207e64272bc8832f696959 Mon Sep 17 00:00:00 2001 From: Rene Gassmoeller Date: Thu, 10 Jun 2021 11:14:22 -0400 Subject: [PATCH] Add asserts where useful --- source/particles/particle_handler.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/particles/particle_handler.cc b/source/particles/particle_handler.cc index 97e9e50e88..0ee9956db9 100644 --- a/source/particles/particle_handler.cc +++ b/source/particles/particle_handler.cc @@ -464,6 +464,7 @@ namespace Particles const typename Triangulation::active_cell_iterator &cell) { Assert(triangulation != nullptr, ExcInternalError()); + Assert(particles.size() == triangulation->n_active_cells(),ExcInternalError()); Assert( cell->is_locally_owned(), ExcMessage( @@ -495,6 +496,7 @@ namespace Particles const ArrayView &properties) { Assert(triangulation != nullptr, ExcInternalError()); + Assert(particles.size() == triangulation->n_active_cells(),ExcInternalError()); Assert(cell.state() == IteratorState::valid, ExcInternalError()); Assert( cell->is_locally_owned(), @@ -529,8 +531,6 @@ namespace Particles typename Triangulation::active_cell_iterator, Particle> &new_particles) { - Assert(triangulation != nullptr, ExcInternalError()); - for (const auto &cell_and_particle : new_particles) insert_particle(cell_and_particle.second, cell_and_particle.first); -- 2.39.5