From: Bruno Turcksin Date: Wed, 14 Sep 2022 19:37:10 +0000 (+0000) Subject: Improve support to FE_Nothing in matrix-free hanging_nodes X-Git-Tag: v9.5.0-rc1~964^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca485850c79eb162727ab2002abf20f7318de8f1;p=dealii.git Improve support to FE_Nothing in matrix-free hanging_nodes --- diff --git a/include/deal.II/matrix_free/hanging_nodes_internal.h b/include/deal.II/matrix_free/hanging_nodes_internal.h index 86312effc9..ba20ae6f3c 100644 --- a/include/deal.II/matrix_free/hanging_nodes_internal.h +++ b/include/deal.II/matrix_free/hanging_nodes_internal.h @@ -529,6 +529,10 @@ namespace internal neighbor->level() == cell->level()) continue; + // Ignore if the neighbors are FE_Nothing + if (neighbor->get_fe().n_dofs_per_cell() == 0) + continue; + face |= 1 << direction; } @@ -549,10 +553,16 @@ namespace internal std::find_if(line_to_cells[line_index].begin(), line_to_cells[line_index].end(), [&cell](const auto &edge_neighbor) { + DoFCellAccessor dof_cell( + &edge_neighbor.first->get_triangulation(), + edge_neighbor.first->level(), + edge_neighbor.first->index(), + &cell->get_dof_handler()); return edge_neighbor.first->is_artificial() == false && edge_neighbor.first->level() < - cell->level(); + cell->level() && + dof_cell.get_fe().n_dofs_per_cell() > 0; }); if (edge_neighbor == line_to_cells[line_index].end())