]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Better diagnostics in case someone enters a line twice.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 3 Apr 2001 15:44:38 +0000 (15:44 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 3 Apr 2001 15:44:38 +0000 (15:44 +0000)
git-svn-id: https://svn.dealii.org/branches/Branch-3-1@4365 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 1769b4a9b0443fc902f1d887abb85d57b9d37f1e..33013365edf2ebbb4186ed6a4ac47d3a7ea3c4a8 100644 (file)
@@ -2992,6 +2992,13 @@ class Triangulation : public TriaDimensionInfo<dim>,
                                      * Exception
                                      */
     DeclException0 (ExcInteriorQuadCantBeBoundary);
+                                    /**
+                                     * Exception
+                                     */
+    DeclException2 (ExcMultiplySetLineInfoOfLine,
+                   int, int,
+                   << "In SubCellData the line info of the line with vertex indices "
+                   << arg1 << " and " << arg2 << " is multiply set.");
                                     /**
                                      * Exception
                                      */
index d6e4040b6aa5f189825c2304e20e4eb5afc1038f..c08fa1f36647583a8872f4472ccafb651ba7c798 100644 (file)
@@ -729,9 +729,10 @@ void Triangulation<2>::create_triangulation (const std::vector<Point<2> >    &v,
            };
        };
 
-                                      // Assert that only exterior lines
-                                      // are given a boundary indicator
-      if (! (line->boundary_indicator() == 0))
+                                      // assert that we only set
+                                      // boundary info once
+      if (line->boundary_indicator() != 0 &&
+         line->boundary_indicator() != 255)
        {
                                           // clear will only work if
                                           // there are no
@@ -750,6 +751,22 @@ void Triangulation<2>::create_triangulation (const std::vector<Point<2> >    &v,
          for (unsigned int i=0; i<n; ++i)
            subscribe();
          
+         AssertThrow (false, ExcMultiplySetLineInfoOfLine(
+           line_vertices.first, line_vertices.second));
+       };
+      
+                                      // Assert that only exterior lines
+                                      // are given a boundary indicator
+      if (line->boundary_indicator() == 255)
+       {
+                                          // same as above
+         const unsigned int n=n_subscriptions();
+         for (unsigned int i=0; i<n; ++i)
+           unsubscribe();
+         clear ();
+         for (unsigned int i=0; i<n; ++i)
+           subscribe();
+         
          AssertThrow (false, ExcInteriorLineCantBeBoundary());
        };
 

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.