]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Silence a warning in icc and provide a default path for switches over
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 7 Oct 2011 21:17:33 +0000 (21:17 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 7 Oct 2011 21:17:33 +0000 (21:17 +0000)
'dim'.

git-svn-id: https://svn.dealii.org/trunk@24561 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/symmetric_tensor.h

index 2bd7a3d17d09613d876d00236831f82202374d2b..fcbdb526cdb51f9def609acb7713c994dfcfddf6 100644 (file)
@@ -1640,19 +1640,19 @@ namespace internal
   {
     switch (dim)
       {
-      case 1:
-       return data[0][0];
-
-      case 2:
-                                  // each entry of the tensor can be
-                                  // thought of as an entry in a
-                                  // matrix that maps the rolled-out
-                                  // rank-2 tensors into rolled-out
-                                  // rank-2 tensors. this is the
-                                  // format in which we store rank-4
-                                  // tensors. determine which
-                                  // position the present entry is
-                                  // stored in
+       case 1:
+             return data[0][0];
+
+       case 2:
+                                              // each entry of the tensor can be
+                                              // thought of as an entry in a
+                                              // matrix that maps the rolled-out
+                                              // rank-2 tensors into rolled-out
+                                              // rank-2 tensors. this is the
+                                              // format in which we store rank-4
+                                              // tensors. determine which
+                                              // position the present entry is
+                                              // stored in
        {
          unsigned int base_index[2] ;
          if ((indices[0] == 0) && (indices[1] == 0))
@@ -1672,16 +1672,16 @@ namespace internal
          return data[base_index[0]][base_index[1]];
        }
 
-      case 3:
-                                  // each entry of the tensor can be
-                                  // thought of as an entry in a
-                                  // matrix that maps the rolled-out
-                                  // rank-2 tensors into rolled-out
-                                  // rank-2 tensors. this is the
-                                  // format in which we store rank-4
-                                  // tensors. determine which
-                                  // position the present entry is
-                                  // stored in
+       case 3:
+                                              // each entry of the tensor can be
+                                              // thought of as an entry in a
+                                              // matrix that maps the rolled-out
+                                              // rank-2 tensors into rolled-out
+                                              // rank-2 tensors. this is the
+                                              // format in which we store rank-4
+                                              // tensors. determine which
+                                              // position the present entry is
+                                              // stored in
        {
          unsigned int base_index[2] ;
          if ((indices[0] == 0) && (indices[1] == 0))
@@ -1726,7 +1726,12 @@ namespace internal
 
          return data[base_index[0]][base_index[1]];
        }
+
+       default:
+             Assert (false, ExcNotImplemented());
       }
+
+    return Number();
   }
 
 

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.