From 4d8141db4896a8afa04d52136ab50c48e8fe02f2 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Sun, 22 Mar 2020 07:28:29 +0100 Subject: [PATCH] Use faster distribute_sparsity_pattern within library --- source/multigrid/mg_transfer_prebuilt.cc | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/source/multigrid/mg_transfer_prebuilt.cc b/source/multigrid/mg_transfer_prebuilt.cc index 3b41615688..70e8e398d4 100644 --- a/source/multigrid/mg_transfer_prebuilt.cc +++ b/source/multigrid/mg_transfer_prebuilt.cc @@ -270,27 +270,10 @@ MGTransferPrebuilt::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()); } -- 2.39.5