Skip to content

Commit

Permalink
Use std::count_if().
Browse files Browse the repository at this point in the history
  • Loading branch information
bangerth committed Jan 16, 2022
1 parent ca4baff commit 88f9fee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/distributed/repartitioning_policy_tools.cc
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ namespace RepartitioningPolicyTools

// step 1) check if all processes have enough cells

const auto locally_owned_cells =
tria_in.active_cell_iterators() | IteratorFilters::LocallyOwnedCell();
const unsigned int n_locally_owned_active_cells =
std::distance(locally_owned_cells.begin(), locally_owned_cells.end());
std::count_if(tria_in.begin_active(),
tria_in.end(),
[](const auto &cell) { return cell->is_locally_owned(); });

const auto comm = tria_in.get_communicator();

Expand Down

0 comments on commit 88f9fee

Please sign in to comment.