From: Peter Munch Date: Sat, 4 Jan 2020 23:51:27 +0000 (+0100) Subject: Fix check of neigboring cells X-Git-Tag: v9.2.0-rc1~744^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9223%2Fhead;p=dealii.git Fix check of neigboring cells --- diff --git a/include/deal.II/matrix_free/mapping_info.templates.h b/include/deal.II/matrix_free/mapping_info.templates.h index 39be9ccbbe..e7357c76bb 100644 --- a/include/deal.II/matrix_free/mapping_info.templates.h +++ b/include/deal.II/matrix_free/mapping_info.templates.h @@ -2048,14 +2048,18 @@ namespace internal cells[cell * vectorization_width + v].second); fe_val.reinit(cell_it, face); - const bool is_local = cell_it->is_locally_owned(); + const bool is_local = + cell_it->is_locally_owned() && + (!cell_it->at_boundary(face) || + (cell_it->at_boundary(face) && + cell_it->has_periodic_neighbor(face))); if (is_local) { auto cell_it_neigh = cell_it->neighbor_or_periodic_neighbor(face); fe_val_neigh.reinit(cell_it_neigh, - cell_it->at_boundary() ? + cell_it->at_boundary(face) ? cell_it->periodic_neighbor_face_no( face) : cell_it->neighbor_face_no(face));