]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Give reasonable error messages when trying to use p::d::Triangulation without p4est
authorDaniel Arndt <arndtd@ornl.gov>
Tue, 4 May 2021 13:26:19 +0000 (09:26 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Tue, 4 May 2021 13:26:54 +0000 (09:26 -0400)
include/deal.II/distributed/tria.h

index 3727241811a13eea53a54a6c060ab24c159a2951..7266bfe40c221ea51dc155f73d4c3738f3b40ded 100644 (file)
@@ -957,11 +957,61 @@ namespace parallel
       : public dealii::parallel::DistributedTriangulationBase<dim, spacedim>
     {
     public:
+      /**
+       * Dummy settings to allow defining the deleted constructor.
+       */
+      enum Settings
+      {
+        default_setting                          = 0x0,
+        mesh_reconstruction_after_repartitioning = 0x1,
+        construct_multigrid_hierarchy            = 0x2,
+        no_automatic_repartitioning              = 0x4
+      };
+
       /**
        * Constructor. Deleted to make sure that objects of this type cannot be
        * constructed (see also the class documentation).
        */
-      Triangulation() = delete;
+      explicit Triangulation(
+        const MPI_Comm &mpi_communicator,
+        const typename dealii::Triangulation<dim, spacedim>::MeshSmoothing
+                       smooth_grid = (dealii::Triangulation<dim, spacedim>::none),
+        const Settings settings    = default_setting) = delete;
+
+      /**
+       * Dummy replacement to allow for better error messages when compiling
+       * this class.
+       */
+      virtual bool
+      is_multilevel_hierarchy_constructed() const override
+      {
+        return false;
+      }
+
+      /**
+       * Dummy replacement to allow for better error messages when compiling
+       * this class.
+       */
+      virtual void
+      save(const std::string &filename) const override
+      {}
+
+      /**
+       * Dummy replacement to allow for better error messages when compiling
+       * this class.
+       */
+      virtual void
+      load(const std::string &filename,
+           const bool         autopartition = true) override
+      {}
+
+      /**
+       * Dummy replacement to allow for better error messages when compiling
+       * this class.
+       */
+      virtual void
+      update_cell_relations() override
+      {}
     };
   } // namespace distributed
 } // namespace parallel

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.