From 709fafd811e226e8f00acbef063ccc7097e4ca23 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 12 Jul 2017 10:25:21 -0600 Subject: [PATCH] Delete the constructor of p::s::Triangulation when no MPI is available. --- include/deal.II/distributed/shared_tria.h | 16 +++++++++------- source/distributed/shared_tria.cc | 10 ---------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/include/deal.II/distributed/shared_tria.h b/include/deal.II/distributed/shared_tria.h index c8b16465c8..b77851a853 100644 --- a/include/deal.II/distributed/shared_tria.h +++ b/include/deal.II/distributed/shared_tria.h @@ -266,13 +266,19 @@ namespace parallel * parallel::shared::Triangulation objects throughout the library even if * it is disabled. * - * Since the constructor of this class is private, no such objects can - * actually be created if MPI is not available. + * Since the constructor of this class is deleted, no such objects + * can actually be created as this would be pointless given that + * MPI is not available. */ template class Triangulation : public dealii::parallel::Triangulation { public: + /** + * Constructor. Deleted to make sure that objects of this type cannot be + * constructed (see also the class documentation). + */ + Triangulation () = delete; /** * A dummy function to return empty vector. @@ -283,12 +289,8 @@ namespace parallel * A dummy function which always returns true. */ bool with_artificial_cells() const; - private: - /** - * Constructor. - */ - Triangulation (); + private: /** * A dummy vector. */ diff --git a/source/distributed/shared_tria.cc b/source/distributed/shared_tria.cc index bef870a3a0..2e794fc077 100644 --- a/source/distributed/shared_tria.cc +++ b/source/distributed/shared_tria.cc @@ -289,16 +289,6 @@ namespace parallel { namespace shared { - template - Triangulation::Triangulation () - : - dealii::parallel::Triangulation(MPI_COMM_SELF) - { - Assert (false, ExcNotImplemented()); - } - - - template bool Triangulation::with_artificial_cells() const -- 2.39.5