]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Condense locally-owned conditions for renumbering
authorfsonner <florian.sonner@iwr.uni-heidelberg.de>
Sat, 25 Apr 2015 14:24:29 +0000 (16:24 +0200)
committerTimo Heister <timo.heister@gmail.com>
Thu, 30 Apr 2015 20:36:24 +0000 (16:36 -0400)
include/deal.II/dofs/dof_renumbering.h
source/dofs/dof_renumbering.cc

index f95a3786e57453bf14b5195484ff747f27e66923..396f4d15e06efaae5f9ef9269d1591490ac79154 100644 (file)
@@ -614,9 +614,8 @@ namespace DoFRenumbering
 
   /**
    * Sort the degrees of freedom by component. It does the same thing as the
-   * above function, only that it does this for one single level of a multi-
-   * level discretization. The non-multigrid part of the the DoFHandler is not
-   * touched.
+   * above function, only that it does this for one single level of a multilevel
+   * discretization. The non-multigrid part of the the DoFHandler is not touched.
    */
   template <class DH>
   void
@@ -659,13 +658,12 @@ namespace DoFRenumbering
 
   /**
    * Sort the degrees of freedom by vector block. It does the same thing as the
-   * above function, only that it does this for one single level of a multi-
-   * level discretization. The non-multigrid part of the the DoFHandler is not
-   * touched.
+   * above function, only that it does this for one single level of a multilevel
+   * discretization. The non-multigrid part of the the DoFHandler is not touched.
    */
   template <int dim, int spacedim>
   void
-  block_wise (DoFHandler<dim,spacedim> &dof_handler, unsigned int level);
+  block_wise (DoFHandler<dim,spacedim> &dof_handler, const unsigned int level);
 
   /**
    * Sort the degrees of freedom by block. It does the same thing as the above
index ada24eda1fb6cd0be5687a120292698ea09685f2..e23fc23f9d952b6b19a61172e06eec48ed7d9a55 100644 (file)
@@ -677,9 +677,7 @@ namespace DoFRenumbering
         if (is_level_operation)
           {
             //we are dealing with mg dofs, skip foreign level cells:
-            if ((start->get_dof_handler().get_tria().locally_owned_subdomain() != numbers::invalid_subdomain_id)
-                &&
-                (cell->level_subdomain_id()!=start->get_dof_handler().get_tria().locally_owned_subdomain()))
+            if (!cell->is_locally_owned_on_level())
               continue;
           }
         else
@@ -928,7 +926,7 @@ namespace DoFRenumbering
   compute_block_wise (std::vector<types::global_dof_index> &new_indices,
                       const ITERATOR    &start,
                       const ENDITERATOR &end,
-                      bool is_level_operation)
+                      const bool is_level_operation)
   {
     const hp::FECollection<dim,spacedim>
     fe_collection (start->get_dof_handler().get_fe ());
@@ -976,9 +974,7 @@ namespace DoFRenumbering
         if (is_level_operation)
           {
             //we are dealing with mg dofs, skip foreign level cells:
-            if ((start->get_dof_handler().get_tria().locally_owned_subdomain() != numbers::invalid_subdomain_id)
-                && (cell->level_subdomain_id()
-                    != start->get_dof_handler().get_tria().locally_owned_subdomain()))
+            if (!cell->is_locally_owned_on_level())
               continue;
           }
         else

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.