]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix GCC compiler warnings related to internal function in error_estimator.cc 1031/head
authorDenis Davydov <davydden@gmail.com>
Sun, 21 Jun 2015 13:06:10 +0000 (15:06 +0200)
committerDenis Davydov <davydden@gmail.com>
Sun, 21 Jun 2015 13:06:10 +0000 (15:06 +0200)
source/numerics/error_estimator.cc

index ae5bafe73133905904e85c0f6a3da05faaa646a0..76514e7323924e8b882c8363c1860d3f53c874c6 100644 (file)
@@ -477,11 +477,20 @@ namespace internal
       switch (strategy)
         {
         case KellyErrorEstimator<DH::dimension,DH::space_dimension>::cell_diameter_over_24 :
+        {
           return 1.0;
+        }
         case KellyErrorEstimator<DH::dimension,DH::space_dimension>::face_diameter_over_twice_max_degree :
+        {
           const double cell_degree = fe_face_values_cell.get_fe_collection()[cell->active_fe_index()].degree;
           return cell->face(face_no)->diameter() / cell_degree;
         }
+        default:
+        {
+          Assert (false, ExcNotImplemented());
+          return -std::numeric_limits<double>::max();
+        }
+        }
     }
 
 
@@ -498,12 +507,21 @@ namespace internal
       switch (strategy)
         {
         case KellyErrorEstimator<DH::dimension,DH::space_dimension>::cell_diameter_over_24 :
+        {
           return 1.0;
+        }
         case KellyErrorEstimator<DH::dimension,DH::space_dimension>::face_diameter_over_twice_max_degree :
+        {
           const double cell_degree     = fe_face_values_cell.get_fe_collection()[cell->active_fe_index()].degree;
           const double neighbor_degree = fe_face_values_neighbor.get_fe_collection()[cell->neighbor(face_no)->active_fe_index()].degree;
           return cell->face(face_no)->diameter() / std::max(cell_degree,neighbor_degree) / 2.0;
         }
+        default:
+        {
+          Assert (false, ExcNotImplemented());
+          return -std::numeric_limits<double>::max();
+        }
+        }
     }
 
     /**
@@ -521,12 +539,21 @@ namespace internal
       switch (strategy)
         {
         case KellyErrorEstimator<DH::dimension,DH::space_dimension>::cell_diameter_over_24 :
+        {
           return 1.0;
+        }
         case KellyErrorEstimator<DH::dimension,DH::space_dimension>::face_diameter_over_twice_max_degree :
+        {
           const double cell_degree = fe_face_values.get_fe_collection()[cell->active_fe_index()].degree;
           const double neighbor_child_degree = fe_subface_values.get_fe_collection()[neighbor_child->active_fe_index()].degree;
           return cell->face(face_no)->child(subface_no)->diameter()/std::max(neighbor_child_degree,cell_degree)/2.0;
         }
+        default:
+        {
+          Assert (false, ExcNotImplemented());
+          return -std::numeric_limits<double>::max();
+        }
+        }
     }
 
     /**
@@ -535,17 +562,26 @@ namespace internal
      */
     template <class DH>
     double cell_factor(const typename DH::active_cell_iterator &cell,
-                       const unsigned int                       face_no,
-                       const DH                                &dof_handler,
+                       const unsigned int                       /*face_no*/,
+                       const DH                                &/*dof_handler*/,
                        const typename KellyErrorEstimator<DH::dimension,DH::space_dimension>::Strategy strategy)
     {
       switch (strategy)
         {
         case KellyErrorEstimator<DH::dimension,DH::space_dimension>::cell_diameter_over_24 :
+        {
           return cell->diameter()/24;
+        }
         case KellyErrorEstimator<DH::dimension,DH::space_dimension>::face_diameter_over_twice_max_degree :
+        {
           return 1.0;
         }
+        default:
+        {
+          Assert (false, ExcNotImplemented());
+          return -std::numeric_limits<double>::max();
+        }
+        }
     }
 
 

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.