]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Simplify a geometrical check. 4051/head
authorDavid Wells <wellsd2@rpi.edu>
Wed, 8 Mar 2017 01:10:38 +0000 (20:10 -0500)
committerDavid Wells <wellsd2@rpi.edu>
Wed, 8 Mar 2017 01:10:38 +0000 (20:10 -0500)
Both branches currently throw an exception, but the second message is more
descriptive.

source/grid/tria.cc

index 6a5ac441059410d84a6e51ba082e81450e5ba9be..284169ef7a9c2b8ab4a2fe16551a83d806b354bd 100644 (file)
@@ -1687,32 +1687,28 @@ namespace internal
               case 2:
                 break;
               default:
-                // in 1d, a node must have one or two adjacent lines
-                if (spacedim==1)
-                  Assert (false, ExcInternalError())
-                  else
-                    AssertThrow (false,
-                                 ExcMessage ("You have a vertex in your triangulation "
-                                             "at which more than two cells come together. "
-                                             "(For one dimensional triangulation, cells are "
-                                             "line segments.)"
-                                             "\n\n"
-                                             "This is not currently supported because the "
-                                             "Triangulation class makes the assumption that "
-                                             "every cell has zero or one neighbors behind "
-                                             "each face (here, behind each vertex), but in your "
-                                             "situation there would be more than one."
-                                             "\n\n"
-                                             "Support for this is not currently implemented. "
-                                             "If you need to work with triangulations where "
-                                             "more than two cells come together at a vertex, "
-                                             "duplicate the vertices once per cell (i.e., put "
-                                             "multiple vertices at the same physical location, "
-                                             "but using different vertex indices for each) "
-                                             "and then ensure continuity of the solution by "
-                                             "explicitly creating constraints that the degrees "
-                                             "of freedom at these vertices have the same "
-                                             "value, using the ConstraintMatrix class."));
+                AssertThrow (false,
+                             ExcMessage ("You have a vertex in your triangulation "
+                                         "at which more than two cells come together. "
+                                         "(For one dimensional triangulation, cells are "
+                                         "line segments.)"
+                                         "\n\n"
+                                         "This is not currently supported because the "
+                                         "Triangulation class makes the assumption that "
+                                         "every cell has zero or one neighbors behind "
+                                         "each face (here, behind each vertex), but in your "
+                                         "situation there would be more than one."
+                                         "\n\n"
+                                         "Support for this is not currently implemented. "
+                                         "If you need to work with triangulations where "
+                                         "more than two cells come together at a vertex, "
+                                         "duplicate the vertices once per cell (i.e., put "
+                                         "multiple vertices at the same physical location, "
+                                         "but using different vertex indices for each) "
+                                         "and then ensure continuity of the solution by "
+                                         "explicitly creating constraints that the degrees "
+                                         "of freedom at these vertices have the same "
+                                         "value, using the ConstraintMatrix class."));
               }
 
           // assert there are no more

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.