From: bangerth Date: Fri, 23 Sep 2011 18:23:54 +0000 (+0000) Subject: Allow compilation when using MPI but not p4est. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9b9203f65634145a939322ef79740da19440251;p=dealii-svn.git Allow compilation when using MPI but not p4est. git-svn-id: https://svn.dealii.org/trunk@24399 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/distributed/tria.h b/deal.II/include/deal.II/distributed/tria.h index f0c3266e02..62d91ad0c6 100644 --- a/deal.II/include/deal.II/distributed/tria.h +++ b/deal.II/include/deal.II/distributed/tria.h @@ -808,6 +808,15 @@ namespace parallel * on other processors. */ types::subdomain_id_t locally_owned_subdomain () const; + + /** + * Return the MPI + * communicator used by this + * triangulation. + */ +#ifdef DEAL_II_COMPILER_SUPPORTS_MPI + MPI_Comm get_communicator () const; +#endif }; } } diff --git a/deal.II/source/distributed/tria.cc b/deal.II/source/distributed/tria.cc index fdd9f503d2..7f7663a016 100644 --- a/deal.II/source/distributed/tria.cc +++ b/deal.II/source/distributed/tria.cc @@ -3041,6 +3041,17 @@ namespace parallel Assert (false, ExcNotImplemented()); return 0; } + + +#ifdef DEAL_II_COMPILER_SUPPORTS_MPI + template + MPI_Comm + Triangulation::get_communicator () const + { + Assert (false, ExcNotImplemented()); + return MPI_COMM_WORLD; + } +#endif } }