From: David Wells Date: Sat, 3 Feb 2018 19:10:22 +0000 (-0500) Subject: Mark some functions as 'inline' to avoid warnings. X-Git-Tag: v9.0.0-rc1~464^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5828%2Fhead;p=dealii.git Mark some functions as 'inline' to avoid warnings. Now that we have more instantiation files, not every auxiliary function is used in every translation unit: get around the warning by marking functions as inline. In addition: avoid using an anonymous namespace here, since we use SPLIT_INSTANTIATIONS_INDEX. --- diff --git a/source/fe/fe_values.cc b/source/fe/fe_values.cc index 197967bb2a..67497fc177 100644 --- a/source/fe/fe_values.cc +++ b/source/fe/fe_values.cc @@ -48,10 +48,11 @@ DEAL_II_NAMESPACE_OPEN -namespace +namespace internal { template typename VectorType::value_type + inline get_vector_element (const VectorType &vector, const types::global_dof_index cell_number) { @@ -59,17 +60,17 @@ namespace } + IndexSet::value_type + inline get_vector_element (const IndexSet &is, const types::global_dof_index cell_number) { return (is.is_element(cell_number) ? 1 : 0); } -} -namespace -{ + template inline std::vector @@ -118,7 +119,7 @@ namespace FEValuesViews // variables from FEValuesBase, but they aren't initialized yet // at the time we get here, so re-create it all const std::vector shape_function_to_row_table - = make_shape_function_to_row_table (fe); + = internal::make_shape_function_to_row_table (fe); for (unsigned int i=0; i shape_function_to_row_table - = make_shape_function_to_row_table (fe); + = internal::make_shape_function_to_row_table (fe); for (unsigned int d=0; d shape_function_to_row_table - = make_shape_function_to_row_table (fe); + = internal::make_shape_function_to_row_table (fe); for (unsigned int d = 0; d < dealii::SymmetricTensor<2,dim>::n_independent_components; ++d) { @@ -376,7 +377,7 @@ namespace FEValuesViews // variables from FEValuesBase, but they aren't initialized yet // at the time we get here, so re-create it all const std::vector shape_function_to_row_table - = make_shape_function_to_row_table (fe); + = internal::make_shape_function_to_row_table (fe); for (unsigned int d = 0; d < dim*dim; ++d) { @@ -2611,7 +2612,7 @@ namespace internal // the rows in the tables storing the data by shape function and // nonzero component this->shape_function_to_row_table - = make_shape_function_to_row_table (fe); + = internal::make_shape_function_to_row_table (fe); // count the total number of non-zero components accumulated // over all shape functions @@ -3175,7 +3176,7 @@ void FEValuesBase::get_function_values ( boost::container::small_vector dof_values(dofs_per_cell); for (unsigned int i=0; ifinite_element_output.shape_values, values); } @@ -3224,7 +3225,7 @@ void FEValuesBase::get_function_values ( boost::container::small_vector dof_values(dofs_per_cell); for (unsigned int i=0; ifinite_element_output.shape_values, *fe, @@ -3255,7 +3256,7 @@ void FEValuesBase::get_function_values ( boost::container::small_vector dof_values(indices.size()); for (unsigned int i=0; ifinite_element_output.shape_values, *fe, @@ -3306,7 +3307,7 @@ void FEValuesBase::get_function_gradients ( boost::container::small_vector dof_values(dofs_per_cell); for (unsigned int i=0; ifinite_element_output.shape_gradients, gradients); } @@ -3358,7 +3359,7 @@ void FEValuesBase::get_function_gradients ( boost::container::small_vector dof_values(indices.size()); for (unsigned int i=0; ifinite_element_output.shape_gradients, *fe, @@ -3409,7 +3410,7 @@ void FEValuesBase::get_function_hessians ( boost::container::small_vector dof_values(dofs_per_cell); for (unsigned int i=0; ifinite_element_output.shape_hessians, hessians); } @@ -3461,7 +3462,7 @@ void FEValuesBase::get_function_hessians ( boost::container::small_vector dof_values(indices.size()); for (unsigned int i=0; ifinite_element_output.shape_hessians, *fe, @@ -3511,7 +3512,7 @@ void FEValuesBase::get_function_laplacians ( boost::container::small_vector dof_values(dofs_per_cell); for (unsigned int i=0; ifinite_element_output.shape_hessians, laplacians); } @@ -3558,7 +3559,7 @@ void FEValuesBase::get_function_laplacians ( boost::container::small_vector dof_values(indices.size()); for (unsigned int i=0; ifinite_element_output.shape_hessians, *fe, this->finite_element_output.shape_function_to_row_table, laplacians, false, @@ -3583,7 +3584,7 @@ void FEValuesBase::get_function_laplacians ( boost::container::small_vector dof_values(indices.size()); for (unsigned int i=0; ifinite_element_output.shape_hessians, *fe, this->finite_element_output.shape_function_to_row_table, laplacians, quadrature_points_fastest, @@ -3631,7 +3632,7 @@ void FEValuesBase::get_function_third_derivatives ( boost::container::small_vector dof_values(dofs_per_cell); for (unsigned int i=0; ifinite_element_output.shape_3rd_derivatives, third_derivatives); } @@ -3683,7 +3684,7 @@ void FEValuesBase::get_function_third_derivatives ( boost::container::small_vector dof_values(indices.size()); for (unsigned int i=0; ifinite_element_output.shape_3rd_derivatives, *fe,