From f9b9203f65634145a939322ef79740da19440251 Mon Sep 17 00:00:00 2001 From: bangerth Date: Fri, 23 Sep 2011 18:23:54 +0000 Subject: [PATCH] Allow compilation when using MPI but not p4est. git-svn-id: https://svn.dealii.org/trunk@24399 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/distributed/tria.h | 9 +++++++++ deal.II/source/distributed/tria.cc | 11 +++++++++++ 2 files changed, 20 insertions(+) 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 } } -- 2.39.5