From 0d3d81b5d2168670f5fb8f9dce0dab936fa81b82 Mon Sep 17 00:00:00 2001 From: heister Date: Sat, 11 Jan 2014 01:52:06 +0000 Subject: [PATCH] fix warning about ambiguous else branch git-svn-id: https://svn.dealii.org/trunk@32193 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/fe/fe_poly_tensor.cc | 92 +++++++++++++++-------------- 1 file changed, 49 insertions(+), 43 deletions(-) diff --git a/deal.II/source/fe/fe_poly_tensor.cc b/deal.II/source/fe/fe_poly_tensor.cc index 84a20f2810..d3bbdb807c 100644 --- a/deal.II/source/fe/fe_poly_tensor.cc +++ b/deal.II/source/fe/fe_poly_tensor.cc @@ -585,27 +585,29 @@ FE_PolyTensor::fill_fe_values ( } if (flags & update_hessians && cell_similarity != CellSimilarity::translation) - if (mapping_type == mapping_nedelec) { - this->compute_2nd (mapping, cell, - typename QProjector::DataSetDescriptor().cell(), - mapping_data, fe_data, data, mapping_covariant_gradient); + if (mapping_type == mapping_nedelec) + { + this->compute_2nd (mapping, cell, + typename QProjector::DataSetDescriptor().cell(), + mapping_data, fe_data, data, mapping_covariant_gradient); - for (unsigned int i = 0; i < this->dofs_per_cell; ++i) - { - const unsigned int first = data.shape_function_to_row_table[i * this->n_components() + - this->get_nonzero_components(i).first_selected_component()]; + for (unsigned int i = 0; i < this->dofs_per_cell; ++i) + { + const unsigned int first = data.shape_function_to_row_table[i * this->n_components() + + this->get_nonzero_components(i).first_selected_component()]; - for (unsigned int k = 0; k < n_q_points; ++k) - for (unsigned int d = 0; d < dim; ++d) - data.shape_hessians[first + d][k] *= sign_change[i]; - } - } + for (unsigned int k = 0; k < n_q_points; ++k) + for (unsigned int d = 0; d < dim; ++d) + data.shape_hessians[first + d][k] *= sign_change[i]; + } + } - else - this->compute_2nd (mapping, cell, - typename QProjector::DataSetDescriptor().cell(), - mapping_data, fe_data, data); + else + this->compute_2nd (mapping, cell, + typename QProjector::DataSetDescriptor().cell(), + mapping_data, fe_data, data); + } } @@ -809,23 +811,25 @@ FE_PolyTensor::fill_fe_face_values ( } if (flags & update_hessians) - if (mapping_type == mapping_nedelec) { - this->compute_2nd (mapping, cell, offset, mapping_data, fe_data, data, mapping_covariant_gradient); + if (mapping_type == mapping_nedelec) + { + this->compute_2nd (mapping, cell, offset, mapping_data, fe_data, data, mapping_covariant_gradient); - for (unsigned int i = 0; i < this->dofs_per_cell; ++i) - { - const unsigned int first = data.shape_function_to_row_table[i * this->n_components() + - this->get_nonzero_components(i).first_selected_component()]; + for (unsigned int i = 0; i < this->dofs_per_cell; ++i) + { + const unsigned int first = data.shape_function_to_row_table[i * this->n_components() + + this->get_nonzero_components(i).first_selected_component()]; - for (unsigned int k = 0; k < n_q_points; ++k) - for (unsigned int d = 0; d < dim; ++d) - data.shape_hessians[first + d][k] *= sign_change[i]; - } - } + for (unsigned int k = 0; k < n_q_points; ++k) + for (unsigned int d = 0; d < dim; ++d) + data.shape_hessians[first + d][k] *= sign_change[i]; + } + } - else - this->compute_2nd (mapping, cell, offset, mapping_data, fe_data, data); + else + this->compute_2nd (mapping, cell, offset, mapping_data, fe_data, data); + } } @@ -1035,23 +1039,25 @@ FE_PolyTensor::fill_fe_subface_values ( } if (flags & update_hessians) - if (mapping_type == mapping_nedelec) { - this->compute_2nd (mapping, cell, offset, mapping_data, fe_data, data, mapping_covariant_gradient); + if (mapping_type == mapping_nedelec) + { + this->compute_2nd (mapping, cell, offset, mapping_data, fe_data, data, mapping_covariant_gradient); - for (unsigned int i = 0; i < this->dofs_per_cell; ++i) - { - const unsigned int first = data.shape_function_to_row_table[i * this->n_components() + - this->get_nonzero_components(i).first_selected_component()]; + for (unsigned int i = 0; i < this->dofs_per_cell; ++i) + { + const unsigned int first = data.shape_function_to_row_table[i * this->n_components() + + this->get_nonzero_components(i).first_selected_component()]; - for (unsigned int k = 0; k < n_q_points; ++k) - for (unsigned int d = 0; d < dim; ++d) - data.shape_hessians[first + d][k] *= sign_change[i]; - } - } + for (unsigned int k = 0; k < n_q_points; ++k) + for (unsigned int d = 0; d < dim; ++d) + data.shape_hessians[first + d][k] *= sign_change[i]; + } + } - else - this->compute_2nd (mapping, cell, offset, mapping_data, fe_data, data); + else + this->compute_2nd (mapping, cell, offset, mapping_data, fe_data, data); + } } -- 2.39.5