From: Daniel Arndt Date: Mon, 18 Apr 2016 17:04:10 +0000 (+0200) Subject: Fixup periodic_neighbor_is_coarser for refined cells X-Git-Tag: v8.5.0-rc1~1095^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2f5fef1959148ec736231db294d8addde912708;p=dealii.git Fixup periodic_neighbor_is_coarser for refined cells --- 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; }