]> https://gitweb.dealii.org/ - dealii.git/commitdiff
MGTwoLevelTransfer: remove fine-vector specialization for DG 13533/head
authorPeter Munch <peterrmuench@gmail.com>
Fri, 11 Mar 2022 16:09:15 +0000 (17:09 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Fri, 11 Mar 2022 21:33:54 +0000 (22:33 +0100)
include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h

index 9f0f74af6b2a677cfd8be93f81ec2662083d6ec6..41fb457810aa24341f04ea89592b2ccab4ad4e84 100644 (file)
@@ -1889,7 +1889,6 @@ namespace internal
             dof_handler_fine.get_fe(fe_index_pair.first.second).degree;
         }
 
-      const auto comm = dof_handler_coarse.get_communicator();
       {
         transfer.partitioner_fine =
           std::make_shared<Utilities::MPI::Partitioner>(
@@ -2012,12 +2011,6 @@ namespace internal
               transfer.level_dof_indices_fine.data() + n_dof_indices_fine[i];
           }
 
-        bool           fine_indices_touch_remote_dofs = false;
-        const IndexSet locally_owned_dofs =
-          mg_level_fine == numbers::invalid_unsigned_int ?
-            dof_handler_fine.locally_owned_dofs() :
-            dof_handler_fine.locally_owned_mg_dofs(mg_level_fine);
-
         transfer.constraint_info.reinit(
           dof_handler_coarse,
           cell_no.back(),
@@ -2044,18 +2037,10 @@ namespace internal
             for (unsigned int i = 0;
                  i < transfer.schemes[fe_pair_no].n_dofs_per_cell_fine;
                  i++)
-              {
-                level_dof_indices_fine[fe_pair_no][i] =
-                  transfer.partitioner_fine->global_to_local(
-                    local_dof_indices_fine
-                      [fe_pair_no]
-                      [lexicographic_numbering_fine[fe_pair_no][i]]);
-                if (!locally_owned_dofs.is_element(
-                      local_dof_indices_fine
-                        [fe_pair_no]
-                        [lexicographic_numbering_fine[fe_pair_no][i]]))
-                  fine_indices_touch_remote_dofs = true;
-              }
+              level_dof_indices_fine[fe_pair_no][i] =
+                transfer.partitioner_fine->global_to_local(
+                  local_dof_indices_fine
+                    [fe_pair_no][lexicographic_numbering_fine[fe_pair_no][i]]);
           }
 
           // move pointers
@@ -2065,13 +2050,6 @@ namespace internal
           }
         });
 
-        // if all access goes to the locally owned dofs on all ranks, we do
-        // not need the vec_fine vector
-        if (Utilities::MPI::max(static_cast<unsigned int>(
-                                  fine_indices_touch_remote_dofs),
-                                comm) == 0)
-          transfer.vec_fine.reinit(0);
-
         transfer.constraint_info.finalize();
       }
 

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.