]> https://gitweb.dealii.org/ - dealii.git/commitdiff
get_n_mpi_processes and get_this_mpi_process functions are now available also without...
authorRalf Hartmann <Ralf.Hartmann@dlr.de>
Tue, 20 Sep 2005 11:24:11 +0000 (11:24 +0000)
committerRalf Hartmann <Ralf.Hartmann@dlr.de>
Tue, 20 Sep 2005 11:24:11 +0000 (11:24 +0000)
git-svn-id: https://svn.dealii.org/trunk@11482 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/utilities.h
deal.II/base/source/utilities.cc

index 318544cc685270dc89451766a686acda4c1c4ddd..25e4717a5a8e153ac52d12ac0f8e4f27ac9292a6 100644 (file)
@@ -20,7 +20,9 @@
 
 #ifdef DEAL_II_USE_PETSC
 #include <petscvec.h>
-#endif    
+#else
+typedef int MPI_Comm;
+#endif
 
 /**
  * A namespace for utility functions that are not particularly specific to
@@ -137,7 +139,6 @@ namespace Utilities
                                       */
     std::string get_time ();
 
-#ifdef DEAL_II_USE_PETSC
                                     /**
                                      * Return the number of MPI
                                      * processes there exist.
@@ -155,7 +156,6 @@ namespace Utilities
                                      * get_n_mpi_processes()).
                                      */
     unsigned int get_this_mpi_process (const MPI_Comm &mpi_communicator);
-#endif // DEAL_II_USE_PETSC    
   }
 }
 
index 24477d14056d1000c90662840942409bcdd68ea6..5f1f620bddb2b061e90c034b9b016aef47acb61f 100644 (file)
@@ -333,6 +333,7 @@ namespace Utilities
 #endif
       return o.str();
     }
+
     
 #ifdef DEAL_II_USE_PETSC
                                 // Unfortunately, we have to work
@@ -385,7 +386,17 @@ namespace Utilities
       
       return rank;
     }
-#endif    
+#else
+    unsigned int get_n_mpi_processes (const MPI_Comm &)
+    {
+      return 1;
+    }
+
+    unsigned int get_this_mpi_process (const MPI_Comm &)
+    {
+      return 0;
+    }
+#endif
   }
   
 }

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.