From: Martin Kronbichler Date: Sun, 22 Mar 2020 06:28:29 +0000 (+0100) Subject: Use faster distribute_sparsity_pattern within library X-Git-Tag: v9.2.0-rc1~239^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d8141db4896a8afa04d52136ab50c48e8fe02f2;p=dealii.git Use faster distribute_sparsity_pattern within library --- 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()); }