From: Ralf Hartmann Date: Tue, 20 Sep 2005 11:24:11 +0000 (+0000) Subject: get_n_mpi_processes and get_this_mpi_process functions are now available also without... X-Git-Tag: v8.0.0~13121 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29a31f807dd7cd5223e956dd764c5a74650184ad;p=dealii.git get_n_mpi_processes and get_this_mpi_process functions are now available also without PETSc git-svn-id: https://svn.dealii.org/trunk@11482 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/utilities.h b/deal.II/base/include/base/utilities.h index 318544cc68..25e4717a5a 100644 --- a/deal.II/base/include/base/utilities.h +++ b/deal.II/base/include/base/utilities.h @@ -20,7 +20,9 @@ #ifdef DEAL_II_USE_PETSC #include -#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 } } diff --git a/deal.II/base/source/utilities.cc b/deal.II/base/source/utilities.cc index 24477d1405..5f1f620bdd 100644 --- a/deal.II/base/source/utilities.cc +++ b/deal.II/base/source/utilities.cc @@ -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 } }