is_dst_remote_potentially_relevant.subtract_set(is_dst_locally_owned);
- std::vector<unsigned int> owning_ranks_of_ghosts(
- is_dst_remote_potentially_relevant.n_elements());
-
- {
- Utilities::MPI::internal::ComputeIndexOwner::
- ConsensusAlgorithmsPayload process(
- is_dst_locally_owned,
- is_dst_remote_potentially_relevant,
- communicator,
- owning_ranks_of_ghosts,
- false);
-
- Utilities::MPI::ConsensusAlgorithms::Selector<
- std::vector<
- std::pair<types::global_cell_index, types::global_cell_index>>,
- std::vector<unsigned int>>
- consensus_algorithm;
- consensus_algorithm.run(process, communicator);
- }
+ const std::vector<unsigned int> owning_ranks_of_ghosts =
+ Utilities::MPI::compute_index_owner(
+ is_dst_locally_owned,
+ is_dst_remote_potentially_relevant,
+ communicator);
for (unsigned i = 0;
i < is_dst_remote_potentially_relevant.n_elements();
const MPI_Comm communicator = dof_handler_fine.get_mpi_communicator();
- std::vector<unsigned int> owning_ranks(
- is_locally_owned_coarse.n_elements());
-
- Utilities::MPI::internal::ComputeIndexOwner::ConsensusAlgorithmsPayload
- process(is_locally_owned_fine,
- is_locally_owned_coarse,
- communicator,
- owning_ranks,
- false);
-
- Utilities::MPI::ConsensusAlgorithms::Selector<
- std::vector<
- std::pair<types::global_cell_index, types::global_cell_index>>,
- std::vector<unsigned int>>
- consensus_algorithm;
- consensus_algorithm.run(process, communicator);
+ const std::vector<unsigned int> owning_ranks =
+ Utilities::MPI::compute_index_owner(is_locally_owned_fine,
+ is_locally_owned_coarse,
+ communicator);
bool all_cells_found = true;
// ------------------------------------------------------------------------
-#include <deal.II/base/mpi_compute_index_owner_internal.h>
-#include <deal.II/base/mpi_consensus_algorithms.h>
+#include <deal.II/base/mpi.h>
#include <deal.II/distributed/repartitioning_policy_tools.h>
#include <deal.II/distributed/tria_base.h>
if (cell->is_locally_owned())
is_coarse.add_index(cell_id_translator.translate(cell));
- std::vector<unsigned int> owning_ranks_of_coarse_cells(
- is_coarse.n_elements());
- {
- Utilities::MPI::internal::ComputeIndexOwner::ConsensusAlgorithmsPayload
- process(is_level_partitions,
- is_coarse,
- communicator,
- owning_ranks_of_coarse_cells,
- false);
-
- Utilities::MPI::ConsensusAlgorithms::Selector<
- std::vector<
- std::pair<types::global_cell_index, types::global_cell_index>>,
- std::vector<unsigned int>>
- consensus_algorithm;
- consensus_algorithm.run(process, communicator);
- }
+ const std::vector<unsigned int> owning_ranks_of_coarse_cells =
+ Utilities::MPI::compute_index_owner(is_level_partitions,
+ is_coarse,
+ communicator);
const auto tria =
dynamic_cast<const parallel::TriangulationBase<dim, spacedim> *>(
&tria_coarse_in);
-
Assert(tria, ExcNotImplemented());
LinearAlgebra::distributed::Vector<double> partition(
#include <deal.II/base/logstream.h>
#include <deal.II/base/mg_level_object.h>
-#include <deal.II/base/mpi_compute_index_owner_internal.h>
+#include <deal.II/base/mpi.h>
#include <deal.II/base/thread_management.h>
#include <deal.II/distributed/tria_base.h>
cell_id_translator.translate(cell, i));
}
- std::vector<unsigned int> is_fine_required_ranks(
- is_fine_required.n_elements());
-
- Utilities::MPI::internal::ComputeIndexOwner::ConsensusAlgorithmsPayload
- process(is_fine_owned,
- is_fine_required,
- communicator,
- is_fine_required_ranks,
- false);
-
- Utilities::MPI::ConsensusAlgorithms::Selector<
- std::vector<
- std::pair<types::global_cell_index, types::global_cell_index>>,
- std::vector<unsigned int>>
- consensus_algorithm;
- consensus_algorithm.run(process, communicator);
+ const std::vector<unsigned int> is_fine_required_ranks =
+ Utilities::MPI::compute_index_owner(is_fine_owned,
+ is_fine_required,
+ communicator);
for (unsigned i = 0; i < is_fine_required.n_elements(); ++i)
if (is_fine_required_ranks[i] == my_rank)