From 88775358df304611e65ceebaae40e0278b1b195e Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 21 Jun 2015 15:06:10 +0200 Subject: [PATCH] fix GCC compiler warnings related to internal function in error_estimator.cc --- source/numerics/error_estimator.cc | 40 ++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/source/numerics/error_estimator.cc b/source/numerics/error_estimator.cc index ae5bafe731..76514e7323 100644 --- a/source/numerics/error_estimator.cc +++ b/source/numerics/error_estimator.cc @@ -477,11 +477,20 @@ namespace internal switch (strategy) { case KellyErrorEstimator::cell_diameter_over_24 : + { return 1.0; + } case KellyErrorEstimator::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::max(); + } + } } @@ -498,12 +507,21 @@ namespace internal switch (strategy) { case KellyErrorEstimator::cell_diameter_over_24 : + { return 1.0; + } case KellyErrorEstimator::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::max(); + } + } } /** @@ -521,12 +539,21 @@ namespace internal switch (strategy) { case KellyErrorEstimator::cell_diameter_over_24 : + { return 1.0; + } case KellyErrorEstimator::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::max(); + } + } } /** @@ -535,17 +562,26 @@ namespace internal */ template 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::Strategy strategy) { switch (strategy) { case KellyErrorEstimator::cell_diameter_over_24 : + { return cell->diameter()/24; + } case KellyErrorEstimator::face_diameter_over_twice_max_degree : + { return 1.0; } + default: + { + Assert (false, ExcNotImplemented()); + return -std::numeric_limits::max(); + } + } } -- 2.39.5