]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
meshworker loop: own_faces=both with hanging nodes not supported
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 3 Jan 2014 10:36:49 +0000 (10:36 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 3 Jan 2014 10:36:49 +0000 (10:36 +0000)
git-svn-id: https://svn.dealii.org/trunk@32141 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/meshworker/loop.h

index 2290f364ce9c1fcec2f19b34376be65df7a49b3d..7d484ad553abe4bf3955bcd0b5ff0df9775edace 100644 (file)
@@ -333,20 +333,23 @@ namespace MeshWorker
                 }
               else
                 {
-                  // Neighbor is
-                  // on same
-                  // level, but
-                  // only do this
-                  // from one side.
-                  if (loop_control.own_faces != LoopControl::both && (neighbor < cell)) continue;
-
-                  // If iterator
-                  // is active
-                  // and neighbor
-                  // is refined,
-                  // skip
+                  // If iterator is active and neighbor is refined, skip
                   // internal face.
                   if (internal::is_active_iterator(cell) && neighbor->has_children())
+                    {
+                      Assert(loop_control.own_faces != LoopControl::both, ExcMessage(
+                          "Assembling from both sides for own_faces is not "
+                          "supported with hanging nodes!"));
+                      continue;
+                    }
+
+                  // Now neighbor is on same level
+                  Assert(cell->level()==neighbor->level(), ExcInternalError());
+
+                  // only do faces on same level from one side (unless
+                  // LoopControl says otherwise)
+                  if (loop_control.own_faces != LoopControl::both
+                      && (neighbor < cell))
                     continue;
 
                   const unsigned int neighbor_face_no = cell->neighbor_face_no(face_no);

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.