107 const auto [owning_ranks_of_ghosts, targets_with_indexset] =
114 std::map<unsigned int, std::vector<types::global_dof_index>> recv_map;
116 for (
const auto &owner : owning_ranks_of_ghosts)
117 recv_map[owner] = std::vector<types::global_dof_index>();
121 recv_map[owning_ranks_of_ghosts[i]].push_back(i);
124 for (
const auto &target_with_indexset : recv_map)
126 recv_ranks.push_back(target_with_indexset.first);
128 for (
const auto cell_index : target_with_indexset.second)
137 for (
const auto &target_with_indexset : targets_with_indexset)
139 send_ranks.push_back(target_with_indexset.first);
141 for (
const auto cell_index : target_with_indexset.second)
153 const std::vector<types::global_dof_index> &indices_has,
154 const std::vector<types::global_dof_index> &indices_want,
159 std::vector<types::global_dof_index> indices_has_clean;
160 indices_has_clean.reserve(indices_has.size());
162 for (
const auto i : indices_has)
164 indices_has_clean.push_back(i);
166 std::vector<types::global_dof_index> indices_want_clean;
167 indices_want_clean.reserve(indices_want.size());
169 for (
const auto i : indices_want)
171 indices_want_clean.push_back(i);
175 indices_has_clean.empty() ?
177 (*std::max_element(indices_has_clean.begin(),
178 indices_has_clean.end()) +
182 indices_want_clean.empty() ?
184 (*std::max_element(indices_want_clean.begin(),
185 indices_want_clean.end()) +
194 index_set_has.
add_indices(indices_has_clean.begin(),
195 indices_has_clean.end());
198 index_set_want.
add_indices(indices_want_clean.begin(),
199 indices_want_clean.end());
207 std::vector<types::global_dof_index> temp_map_send(
215 i = temp_map_send[i];
219 std::vector<types::global_dof_index> temp_map_recv(
227 i = temp_map_recv[i];
std::pair< std::vector< unsigned int >, std::map< unsigned int, IndexSet > > compute_index_owner_and_requesters(const IndexSet &owned_indices, const IndexSet &indices_to_look_up, const MPI_Comm &comm)
::VectorizedArray< Number, width > max(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)