From: Timo Heister Date: Mon, 8 Nov 2021 23:41:37 +0000 (-0500) Subject: minor MGRepartiniong edits X-Git-Tag: v9.4.0-rc1~854^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5dded7e53f6c047871234594ca5128685d240591;p=dealii.git minor MGRepartiniong edits --- diff --git a/include/deal.II/distributed/repartitioning_policy_tools.h b/include/deal.II/distributed/repartitioning_policy_tools.h index ff283c56fd..81d412c45c 100644 --- a/include/deal.II/distributed/repartitioning_policy_tools.h +++ b/include/deal.II/distributed/repartitioning_policy_tools.h @@ -39,7 +39,11 @@ DEAL_II_NAMESPACE_OPEN namespace RepartitioningPolicyTools { /** - * A base class of a repartitioning policy. + * The base class for repartitioning policies. + * + * Used in + * MGTransferGlobalCoarseningTools::create_geometric_coarsening_sequence(). + * See the description of RepartitioningPolicyTools for more information. */ template class Base @@ -121,8 +125,10 @@ namespace RepartitioningPolicyTools }; /** - * A policy that allows to specify a minimal number of cells per process. If - * a threshold is reached, processes might be left without cells. + * A policy that allows to specify a minimal number of cells per + * process. If a threshold is reached, processes might be left + * without cells. The cells will be distributed evenly among the + * remaining processes. */ template class MinimalGranularityPolicy : public Base diff --git a/include/deal.II/multigrid/mg_transfer_global_coarsening.h b/include/deal.II/multigrid/mg_transfer_global_coarsening.h index a02f83a821..e1a42451cb 100644 --- a/include/deal.II/multigrid/mg_transfer_global_coarsening.h +++ b/include/deal.II/multigrid/mg_transfer_global_coarsening.h @@ -135,8 +135,8 @@ namespace MGTransferGlobalCoarseningTools /** * Similar to the above function but taking in a constant version of - * @p tria and as a consequence not allowing to directly use it for - * coarsening, requiring that internally a temporal copy is created. + * @p tria. As a consequence, it can not be used for coarsening directly, + * so a temporary copy will be created internally. */ template std::vector>> diff --git a/source/distributed/repartitioning_policy_tools.cc b/source/distributed/repartitioning_policy_tools.cc index 9b203f93c2..be19473898 100644 --- a/source/distributed/repartitioning_policy_tools.cc +++ b/source/distributed/repartitioning_policy_tools.cc @@ -219,12 +219,14 @@ namespace RepartitioningPolicyTools // a repartitioning kicks in with the aim that all processes that own // cells have at least the specified number of cells - const unsigned int n_global_active_cells = tria_in.n_global_active_cells(); + const types::global_cell_index n_global_active_cells = + tria_in.n_global_active_cells(); const unsigned int n_partitions = std::max(1, - std::min(n_global_active_cells / n_min_cells, - Utilities::MPI::n_mpi_processes(comm))); + std::min( + n_global_active_cells / n_min_cells, + Utilities::MPI::n_mpi_processes(comm))); const unsigned int min_cells = n_global_active_cells / n_partitions; @@ -322,6 +324,7 @@ namespace RepartitioningPolicyTools Utilities::MPI::internal::mpi_type_id(&total_weight), n_subdomains - 1, mpi_communicator); + AssertThrowMPI(ierr); // setup partition LinearAlgebra::distributed::Vector partition(partitioner);