]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Intoduce and use new ExcNeedsMPI 9624/head
authorPeter Munch <peterrmuench@gmail.com>
Thu, 5 Mar 2020 10:27:14 +0000 (11:27 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Fri, 6 Mar 2020 07:17:14 +0000 (08:17 +0100)
include/deal.II/base/exceptions.h
source/distributed/tria_base.cc

index a39dc457b986e3c7a1fa1d7718c711fe556c3adf..6444344f11d1a5fd3eb700388530726b307b939a 100644 (file)
@@ -1086,6 +1086,14 @@ namespace StandardExceptions
     "if deal.II was configured to use LAPACK, but cmake did not "
     "find a valid LAPACK library.");
 
+  /**
+   * This function requires support for the MPI library.
+   */
+  DeclExceptionMsg(
+    ExcNeedsMPI,
+    "You are attempting to use functionality that is only available "
+    "if deal.II was configured to use MPI.");
+
   /**
    * This function requires support for the NetCDF library.
    *
index 189be2a997ab78799a02d9018ccf9d7a5b38a3a3..e52413f64da696c638f99217449df51c41625be5 100644 (file)
@@ -52,9 +52,7 @@ namespace parallel
     , n_subdomains(Utilities::MPI::n_mpi_processes(this->mpi_communicator))
   {
 #ifndef DEAL_II_WITH_MPI
-    Assert(false,
-           ExcMessage("You compiled deal.II without MPI support, for "
-                      "which parallel::TriangulationBase is not available."));
+    Assert(false, ExcNeedsMPI());
 #endif
   }
 
@@ -67,9 +65,7 @@ namespace parallel
   {
 #ifndef DEAL_II_WITH_MPI
     (void)other_tria;
-    Assert(false,
-           ExcMessage("You compiled deal.II without MPI support, for "
-                      "which parallel::TriangulationBase is not available."));
+    Assert(false, ExcNeedsMPI());
 #else
     dealii::Triangulation<dim, spacedim>::copy_triangulation(other_tria);
 

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.