]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Delete the constructor of p::s::Triangulation when no MPI is available.
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 12 Jul 2017 16:25:21 +0000 (10:25 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 12 Jul 2017 16:58:14 +0000 (10:58 -0600)
include/deal.II/distributed/shared_tria.h
source/distributed/shared_tria.cc

index c8b16465c8da2deb75b1766d1843196788c44f4a..b77851a853ad46b3eaf83ef5cebdbbc934af898e 100644 (file)
@@ -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 <int dim, int spacedim = dim>
     class Triangulation : public dealii::parallel::Triangulation<dim,spacedim>
     {
     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.
        */
index bef870a3a03aee3f3955566276040141fc2d45c6..2e794fc07754471a75698f8696d06f88503838e3 100644 (file)
@@ -289,16 +289,6 @@ namespace parallel
 {
   namespace shared
   {
-    template <int dim, int spacedim>
-    Triangulation<dim,spacedim>::Triangulation ()
-      :
-      dealii::parallel::Triangulation<dim,spacedim>(MPI_COMM_SELF)
-    {
-      Assert (false, ExcNotImplemented());
-    }
-
-
-
     template <int dim, int spacedim>
     bool
     Triangulation<dim,spacedim>::with_artificial_cells() const

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.