]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
New ExcMultiplySetLineInfoOfLine exception. Fix: Check for the error that previously...
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 3 Apr 2001 15:42:56 +0000 (15:42 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 3 Apr 2001 15:42:56 +0000 (15:42 +0000)
git-svn-id: https://svn.dealii.org/trunk@4364 0785d39b-7218-0410-832d-ea1e28bc413d

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

index aed1c76238f9080719adf27cc02e51b0ce53a12f..457ca134f596cfb32fe9052508e968697c514b14 100644 (file)
@@ -2993,6 +2993,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 d368203b642bb5619b41f93e8e87e766c36c6e2f..af652318bd02dc30bdb9197bbb744c7978c8a917 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.