]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add assert to prevent floating point exception 9389/head
authorPeter Munch <peterrmuench@gmail.com>
Sun, 19 Jan 2020 07:29:19 +0000 (08:29 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Sun, 19 Jan 2020 07:29:19 +0000 (08:29 +0100)
include/deal.II/base/mpi_compute_index_owner_internal.h

index ba3b542c25625b3fa9eec0179964bfdf5be7fd9d..973dd377abc7b9c28ac9e5e2db5e9877c98a79aa 100644 (file)
@@ -499,7 +499,10 @@ namespace Utilities
             const unsigned int n_procs = n_mpi_processes(comm);
             const unsigned int my_rank = this_mpi_process(comm);
 
-            size             = owned_indices.size();
+            size = owned_indices.size();
+
+            Assert(size > 0, ExcNotImplemented());
+
             dofs_per_process = (size + n_procs - 1) / n_procs;
             if (dofs_per_process < range_minimum_grain_size)
               {

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.