From b2f5fef1959148ec736231db294d8addde912708 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Mon, 18 Apr 2016 19:04:10 +0200 Subject: [PATCH] Fixup periodic_neighbor_is_coarser for refined cells --- source/grid/tria_accessor.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/grid/tria_accessor.cc b/source/grid/tria_accessor.cc index c59e62b198..a4ada476cd 100644 --- a/source/grid/tria_accessor.cc +++ b/source/grid/tria_accessor.cc @@ -2168,9 +2168,10 @@ CellAccessor::periodic_neighbor_is_coarser (const unsigned int i_ */ Assert (nb_face_pair != this->tria->periodic_face_map.end(), TriaAccessorExceptions::ExcNoPeriodicNeighbor()); - if (nb_face_pair->second.first.first->face(nb_face_pair->second.first.second)->has_children()) - return true; - return false; + const unsigned int my_level = this->level(); + const unsigned int neighbor_level = nb_face_pair->second.first.first->level(); + Assert (my_level >= neighbor_level, ExcInternalError()); + return my_level > neighbor_level; } -- 2.39.5