]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fixup periodic_neighbor_is_coarser for refined cells
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 18 Apr 2016 17:04:10 +0000 (19:04 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 18 Apr 2016 17:10:19 +0000 (19:10 +0200)
source/grid/tria_accessor.cc

index c59e62b19894e7b7a2c181b58a4489574423a0c5..a4ada476cd1438ecbf95f71a3d7ab6938fbef8d0 100644 (file)
@@ -2168,9 +2168,10 @@ CellAccessor<dim, spacedim>::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;
 }
 
 

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.