Skip to content

Commit

Permalink
Small edits
Browse files Browse the repository at this point in the history
  • Loading branch information
garth-wells committed Sep 24, 2024
1 parent 2e1a292 commit a93f175
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cpp/dolfinx/common/IndexMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ compute_submap_indices(const IndexMap& imap,
auto it_upper = std::ranges::upper_bound(
it, global_idx_to_possible_owner.end(), idx, std::ranges::less(),
[](auto e) { return e.first; });
std::transform(it + 1, it_upper,
std::transform(std::next(it), it_upper,
std::back_inserter(new_owner_dest_ranks),
[](auto e) { return e.second; });
}
Expand Down Expand Up @@ -1161,8 +1161,8 @@ graph::AdjacencyList<int> IndexMap::index_to_dest_ranks() const
dolfinx::MPI::check_error(_comm.comm(), ierr);

// Prepare displacement vectors
std::vector<int> send_disp(dest.size() + 1, 0),
recv_disp(src.size() + 1, 0);
std::vector<int> send_disp(dest.size() + 1, 0);
std::vector<int> recv_disp(src.size() + 1, 0);
std::partial_sum(send_sizes.begin(), send_sizes.end(),
std::next(send_disp.begin()));
std::partial_sum(recv_sizes.begin(), recv_sizes.end(),
Expand Down

0 comments on commit a93f175

Please sign in to comment.