]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fixed serial case.
authorLuca Heltai <luca.heltai@sissa.it>
Mon, 20 Nov 2017 09:37:30 +0000 (10:37 +0100)
committerLuca Heltai <luca.heltai@sissa.it>
Mon, 20 Nov 2017 09:45:55 +0000 (10:45 +0100)
include/deal.II/base/mpi.templates.h

index 2ee5ce7e678f6895986b8208e31707ba1787c581..db4b33f35cc27d87c9ffbafe760abdc6422c41e1 100644 (file)
@@ -197,9 +197,10 @@ namespace Utilities
     {
 #ifndef DEAL_II_WITH_MPI
       (void)comm;
-      (void)objects_to_send;
-      Assert (false, ExcMessage ("The function some_to_some doesn't make"
-                                 "any sense if you do not have MPI enabled. "));
+      Assert(objects_to_send.size() == 0, ExcMessage("Cannot send to more than one processor."));
+      Assert(objects_to_send.find(0) != objects_to_send.end() || objects_to_send.size() == 0,
+             ExcMessage("Can only send to myself or to nobody."));
+      return objects_to_send;
 #else
       const auto n_procs = dealii::Utilities::MPI::n_mpi_processes(comm);
       const auto my_proc = dealii::Utilities::MPI::this_mpi_process(comm);
@@ -278,9 +279,8 @@ namespace Utilities
     {
 #ifndef DEAL_II_WITH_MPI
       (void)comm;
-      (void)objects_to_send;
-      Assert (false, ExcMessage ("The function all_gather doesn't make"
-                                 "any sense if you do not have MPI enabled. "));
+      std::vector<T> v(1, object);
+      return v;
 #else
       const auto n_procs = dealii::Utilities::MPI::n_mpi_processes(comm);
 

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.