Skip to content

Commit

Permalink
Fix one more lambda in unevaluated context issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tamiko committed Aug 14, 2024
1 parent c0f9f0d commit 093ed01
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions source/grid/grid_tools.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3808,18 +3808,19 @@ namespace GridTools
void
DistributedComputePointLocationsInternal<dim, spacedim>::finalize_setup()
{
// before reshuffeling the data check if data.recv_components and
#ifdef DEBUG
// Before reshuffeling the data check if data.recv_components and
// n_searched_points are in a valid state.
Assert(n_searched_points != numbers::invalid_unsigned_int,
ExcInternalError());
Assert(recv_components.empty() ||
std::get<1>(*std::max_element(recv_components.begin(),
recv_components.end(),
[](const auto &a, const auto &b) {
return std::get<1>(a) <
std::get<1>(b);
})) < n_searched_points,
ExcInternalError());
const bool have_valid_state =
std::get<1>(*std::max_element(recv_components.begin(),
recv_components.end(),
[](const auto &a, const auto &b) {
return std::get<1>(a) < std::get<1>(b);
})) < n_searched_points;
Assert(recv_components.empty() || have_valid_state, ExcInternalError());
#endif

send_ranks.clear();
recv_ranks.clear();
Expand Down

0 comments on commit 093ed01

Please sign in to comment.