]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix check of neigboring cells 9223/head
authorPeter Munch <peterrmuench@gmail.com>
Sat, 4 Jan 2020 23:51:27 +0000 (00:51 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Sat, 4 Jan 2020 23:51:27 +0000 (00:51 +0100)
include/deal.II/matrix_free/mapping_info.templates.h

index 39be9ccbbefaab72a41405c7505be228ee2db3fd..e7357c76bbb10bb9758f977b7ec3682e4a174d57 100644 (file)
@@ -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));

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.