]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add missing assertions. 12413/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 8 Jun 2021 16:24:20 +0000 (10:24 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 8 Jun 2021 16:27:01 +0000 (10:27 -0600)
source/fe/fe_simplex_p.cc

index ca7851bbc68966833688447e498238175cd5086f..442cbd9125561e555ec05c38ade7c9b2e38b1056 100644 (file)
@@ -35,8 +35,6 @@ namespace
   std::vector<unsigned int>
   get_dpo_vector_fe_p(const unsigned int dim, const unsigned int degree)
   {
-    Assert(degree == 1 || degree == 2, ExcNotImplemented());
-
     switch (dim)
       {
         case 1:
@@ -46,6 +44,8 @@ namespace
                 return {1, 0};
               case 2:
                 return {1, 1};
+              default:
+                Assert(false, ExcNotImplemented());
             }
         case 2:
           switch (degree)
@@ -54,6 +54,8 @@ namespace
                 return {1, 0, 0};
               case 2:
                 return {1, 1, 0};
+              default:
+                Assert(false, ExcNotImplemented());
             }
         case 3:
           switch (degree)
@@ -62,6 +64,8 @@ namespace
                 return {1, 0, 0, 0};
               case 2:
                 return {1, 1, 0, 0};
+              default:
+                Assert(false, ExcNotImplemented());
             }
       }
 

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.