107 std::vector<unsigned int> owning_ranks_of_ghosts(
112 process(indexset_has,
115 owning_ranks_of_ghosts,
120 std::pair<types::global_dof_index, types::global_dof_index>>,
121 std::vector<unsigned int>>
127 std::map<unsigned int, std::vector<types::global_dof_index>> recv_map;
129 for (
const auto &owner : owning_ranks_of_ghosts)
130 recv_map[owner] = std::vector<types::global_dof_index>();
134 recv_map[owning_ranks_of_ghosts[i]].push_back(i);
137 for (
const auto &target_with_indexset : recv_map)
139 recv_ranks.push_back(target_with_indexset.first);
141 for (
const auto cell_index : target_with_indexset.second)
152 for (
const auto &target_with_indexset : targets_with_indexset)
154 send_ranks.push_back(target_with_indexset.first);
156 for (
const auto cell_index : target_with_indexset.second)
168 const std::vector<types::global_dof_index> &indices_has,
169 const std::vector<types::global_dof_index> &indices_want,
174 std::vector<types::global_dof_index> indices_has_clean;
175 indices_has_clean.reserve(indices_has.size());
177 for (
const auto i : indices_has)
179 indices_has_clean.push_back(i);
181 std::vector<types::global_dof_index> indices_want_clean;
182 indices_want_clean.reserve(indices_want.size());
184 for (
const auto i : indices_want)
186 indices_want_clean.push_back(i);
190 indices_has_clean.empty() ?
192 (*std::max_element(indices_has_clean.begin(),
193 indices_has_clean.end()) +
197 indices_want_clean.empty() ?
199 (*std::max_element(indices_want_clean.begin(),
200 indices_want_clean.end()) +
209 index_set_has.
add_indices(indices_has_clean.begin(),
210 indices_has_clean.end());
213 index_set_want.
add_indices(indices_want_clean.begin(),
214 indices_want_clean.end());
222 std::vector<types::global_dof_index> temp_map_send(
230 i = temp_map_send[i];
234 std::vector<types::global_dof_index> temp_map_recv(
242 i = temp_map_recv[i];
virtual std::vector< unsigned int > run(const std::vector< unsigned int > &targets, const std::function< RequestType(const unsigned int)> &create_request, const std::function< AnswerType(const unsigned int, const RequestType &)> &answer_request, const std::function< void(const unsigned int, const AnswerType &)> &process_answer, const MPI_Comm comm) override
::VectorizedArray< Number, width > max(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)