]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix bug in particle handler insertion
authorSebastian Fuchs <sebastian.fuchs@tum.de>
Tue, 31 Aug 2021 07:42:50 +0000 (09:42 +0200)
committerSebastian Fuchs <sebastian.fuchs@tum.de>
Tue, 31 Aug 2021 08:44:11 +0000 (10:44 +0200)
Fix a bug in ParticleHandler::insert_particles(const
std::vector<Point<spacedim>> &positions) that occurs when no particles
are inserted on some processors.

source/particles/particle_handler.cc

index 2f12ce3e91c62f42a8c0de1b9e725822f2050360..f86f0ceabf652918f0c262b471d533d100de7b11 100644 (file)
@@ -590,9 +590,6 @@ namespace Particles
 
     (void)missing_points;
 
-    if (cells.size() == 0)
-      return;
-
     for (unsigned int i = 0; i < cells.size(); ++i)
       for (unsigned int p = 0; p < local_positions[i].size(); ++p)
         insert_particle(positions[index_map[i][p]],

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.