]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add missing clear_despite_subscriptions function calls.
authorRalf Hartmann <Ralf.Hartmann@dlr.de>
Tue, 15 Mar 2005 09:49:51 +0000 (09:49 +0000)
committerRalf Hartmann <Ralf.Hartmann@dlr.de>
Tue, 15 Mar 2005 09:49:51 +0000 (09:49 +0000)
git-svn-id: https://svn.dealii.org/trunk@10151 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/tria.cc

index af33c7d9d6d02c61176d49797ee8d9aa836b1947..3e2cba2acd1c1a65fedb3e4c2c0b577cf6902ea1 100644 (file)
@@ -1240,17 +1240,22 @@ Triangulation<3>::create_triangulation (const std::vector<Point<3> >    &v,
            line = needed_lines[line_vertices];
          else
            {
+             clear_despite_subscriptions ();
                                               // line does not exist
              AssertThrow (false, ExcLineInexistant(line_vertices.first,
                                                    line_vertices.second));
              line = end_line();
-           };
-       };
+           }
+       }
                                       // Assert that only exterior
                                       // lines are given a boundary
                                       // indicator
-      AssertThrow (line->at_boundary(),
-                  ExcInteriorLineCantBeBoundary());
+      if (!line->at_boundary())
+       {
+         clear_despite_subscriptions ();
+
+         AssertThrow (false, ExcInteriorLineCantBeBoundary());
+       }
 
                                        // and make sure that we don't
                                        // attempt to reset the
@@ -1258,12 +1263,18 @@ Triangulation<3>::create_triangulation (const std::vector<Point<3> >    &v,
                                        // different than the
                                        // previously set value
       if (line->boundary_indicator() != 0)
-        AssertThrow (line->boundary_indicator() ==
-                     boundary_line->material_id,
-                     ExcMessage ("Duplicate boundary lines are only allowed "
-                                 "if they carry the same boundary indicator."));
+       {
+         if (line->boundary_indicator() != boundary_line->material_id)
+           {
+             clear_despite_subscriptions ();
+
+             AssertThrow (false, ExcMessage (
+               "Duplicate boundary lines are only allowed "
+               "if they carry the same boundary indicator."));
+           }
+       }
       line->set_boundary_indicator (boundary_line->material_id);
-    };       
+    }
 
 
                                   // now go on with boundary faces
@@ -1302,6 +1313,7 @@ Triangulation<3>::create_triangulation (const std::vector<Point<3> >    &v,
                line[i] = needed_lines[line_vertices];
              else
                {
+                 clear_despite_subscriptions ();
                                                   // line does not
                                                   // exist
                  AssertThrow (false, ExcLineInexistant(line_vertices.first,
@@ -1354,6 +1366,8 @@ Triangulation<3>::create_triangulation (const std::vector<Point<3> >    &v,
  
       if (n_rotations==4)
        {
+         clear_despite_subscriptions();
+
                                // quad does not exist
          AssertThrow (false, ExcQuadInexistant(line[0]->index(), line[1]->index(),
                                                line[2]->index(), line[3]->index()));
@@ -1370,8 +1384,12 @@ Triangulation<3>::create_triangulation (const std::vector<Point<3> >    &v,
 
                                       // check whether this face is
                                       // really an exterior one
-      AssertThrow(quad->at_boundary(),
-                 ExcInteriorQuadCantBeBoundary());
+      if (!quad->at_boundary())
+       {
+         clear_despite_subscriptions ();
+
+         AssertThrow(false, ExcInteriorQuadCantBeBoundary());
+       }
 
                                        // and make sure that we don't
                                        // attempt to reset the
@@ -1379,10 +1397,16 @@ Triangulation<3>::create_triangulation (const std::vector<Point<3> >    &v,
                                        // different than the
                                        // previously set value
       if (quad->boundary_indicator() != 0)
-        AssertThrow (quad->boundary_indicator() ==
-                     boundary_quad->material_id,
-                     ExcMessage ("Duplicate boundary quads are only allowed "
-                                 "if they carry the same boundary indicator."));
+       {
+         if (quad->boundary_indicator() != boundary_quad->material_id)
+           {
+             clear_despite_subscriptions ();
+         
+             AssertThrow (false, ExcMessage (
+               "Duplicate boundary quads are only allowed "
+               "if they carry the same boundary indicator."));
+           }
+       }
       quad->set_boundary_indicator (boundary_quad->material_id); 
     }
 

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.