Skip to content

Commit

Permalink
Merge pull request #13872 from kronbichler/reduce_cost_hanging_nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
masterleinad committed Jun 1, 2022
2 parents 55a24b5 + d584927 commit 842b53c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions include/deal.II/matrix_free/hanging_nodes_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,17 @@ namespace internal
inline void
HangingNodes<3>::setup_line_to_cell(const Triangulation<3> &triangulation)
{
// Check if we there are no hanging nodes on the current MPI process,
// which we do by checking if the second finest level holds no active
// non-artificial cell
if (triangulation.n_levels() <= 1 ||
std::none_of(triangulation.begin_active(triangulation.n_levels() - 2),
triangulation.end_active(triangulation.n_levels() - 2),
[](const CellAccessor<3, 3> &cell) {
return !cell.is_artificial();
}))
return;

const unsigned int n_raw_lines = triangulation.n_raw_lines();
this->line_to_cells.resize(n_raw_lines);

Expand Down

0 comments on commit 842b53c

Please sign in to comment.