From: Wolfgang Bangerth Date: Wed, 12 Jul 2017 16:25:21 +0000 (-0600) Subject: Delete the constructor of p::s::Triangulation when no MPI is available. X-Git-Tag: v9.0.0-rc1~1425^2~8 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=709fafd811e226e8f00acbef063ccc7097e4ca23;p=dealii.git Delete the constructor of p::s::Triangulation when no MPI is available. --- 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