]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use faster distribute_sparsity_pattern within library
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Sun, 22 Mar 2020 06:28:29 +0000 (07:28 +0100)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Fri, 10 Apr 2020 14:39:22 +0000 (16:39 +0200)
source/multigrid/mg_transfer_prebuilt.cc

index 3b416156882ee4ad3e5c5964290d6b9cb7c617e4..70e8e398d4cde56fd5d3c1a8a3dedd3bd63e6143 100644 (file)
@@ -270,27 +270,10 @@ MGTransferPrebuilt<VectorType>::build(
                                     dist_tria->get_communicator() :
                                     MPI_COMM_SELF;
 
-          // Compute # of locally owned MG dofs / processor for distribution
-          const std::vector<::dealii::IndexSet>
-            locally_owned_mg_dofs_per_processor =
-              dof_handler.compute_locally_owned_mg_dofs_per_processor(level +
-                                                                      1);
-          std::vector<::dealii::types::global_dof_index>
-            n_locally_owned_mg_dofs_per_processor(
-              locally_owned_mg_dofs_per_processor.size(), 0);
-
-          for (std::size_t index = 0;
-               index < n_locally_owned_mg_dofs_per_processor.size();
-               ++index)
-            {
-              n_locally_owned_mg_dofs_per_processor[index] =
-                locally_owned_mg_dofs_per_processor[index].n_elements();
-            }
-
           // Distribute sparsity pattern
           ::dealii::SparsityTools::distribute_sparsity_pattern(
             dsp,
-            n_locally_owned_mg_dofs_per_processor,
+            dof_handler.locally_owned_mg_dofs(level + 1),
             communicator,
             dsp.row_index_set());
         }

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.