]> https://gitweb.dealii.org/ - dealii.git/commitdiff
move is_multilevel_hierarchy_constructed() up 9915/head
authorTimo Heister <timo.heister@gmail.com>
Fri, 17 Apr 2020 14:06:17 +0000 (10:06 -0400)
committerTimo Heister <timo.heister@gmail.com>
Sat, 18 Apr 2020 16:44:06 +0000 (12:44 -0400)
Move is_multilevel_hierarchy_constructed() from
DistributedTriangulationBase to parallel::TriangulationBase

include/deal.II/distributed/shared_tria.h
include/deal.II/distributed/tria_base.h
source/distributed/shared_tria.cc

index 41295be797f73d46ebe4133d7eb04979f9a92fbd..b9b24d09dad7a2cbebee8aeb8f55b82f80054940 100644 (file)
@@ -248,6 +248,12 @@ namespace parallel
        */
       virtual ~Triangulation() override = default;
 
+      /**
+       * Return if multilevel hierarchy is supported and has been constructed.
+       */
+      virtual bool
+      is_multilevel_hierarchy_constructed() const override;
+
       /**
        * Coarsen and refine the mesh according to refinement and coarsening
        * flags set.
@@ -423,6 +429,12 @@ namespace parallel
        */
       Triangulation() = delete;
 
+      /**
+       * Return if multilevel hierarchy is supported and has been constructed.
+       */
+      virtual bool
+      is_multilevel_hierarchy_constructed() const override;
+
       /**
        * A dummy function to return empty vector.
        */
index 0203f6cc7732b4d32bf5d2935a3fa95cbb4d3bc6..6b6efd4b3889fc1ac4cfa0f2eb1d2b0782106735 100644 (file)
@@ -96,6 +96,12 @@ namespace parallel
     virtual const MPI_Comm &
     get_communicator() const;
 
+    /**
+     * Return if multilevel hierarchy is supported and has been constructed.
+     */
+    virtual bool
+    is_multilevel_hierarchy_constructed() const = 0;
+
     /**
      * Implementation of the same function as in the base class.
      *
@@ -361,12 +367,6 @@ namespace parallel
       const typename dealii::Triangulation<dim, spacedim>::MeshSmoothing
                  smooth_grid = (dealii::Triangulation<dim, spacedim>::none),
       const bool check_for_distorted_cells = false);
-
-    /**
-     * Return if multilevel hierarchy is supported and has been constructed.
-     */
-    virtual bool
-    is_multilevel_hierarchy_constructed() const = 0;
   };
 
 } // namespace parallel
index 31cdf26447b8c9ced9d744d028e26f51e46f9e62..a21102ad3771bbc7f23f3447269e6902ed09e48b 100644 (file)
@@ -69,6 +69,15 @@ namespace parallel
 
 
 
+    template <int dim, int spacedim>
+    bool
+    Triangulation<dim, spacedim>::is_multilevel_hierarchy_constructed() const
+    {
+      return (settings & construct_multigrid_hierarchy);
+    }
+
+
+
     template <int dim, int spacedim>
     void
     Triangulation<dim, spacedim>::partition()
@@ -439,7 +448,12 @@ namespace parallel
       return true;
     }
 
-
+    template <int dim, int spacedim>
+    bool
+    Triangulation<dim, spacedim>::is_multilevel_hierarchy_constructed() const
+    {
+      return false;
+    }
 
     template <int dim, int spacedim>
     const std::vector<unsigned int> &

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.