From: Luca Heltai Date: Mon, 7 Aug 2017 18:22:27 +0000 (-0600) Subject: Use make_array_view X-Git-Tag: v9.0.0-rc1~1343^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4707%2Fhead;p=dealii.git Use make_array_view --- diff --git a/source/fe/fe_values.cc b/source/fe/fe_values.cc index 0f75279c49..2d1ab1755f 100644 --- a/source/fe/fe_values.cc +++ b/source/fe/fe_values.cc @@ -456,8 +456,8 @@ namespace FEValuesViews // ------------------------- scalar functions -------------------------- template void - do_function_values (const ArrayView &dof_values, - const Table<2,double> &shape_values, + do_function_values (const ArrayView &dof_values, + const Table<2,double> &shape_values, const std::vector::ShapeFunctionData> &shape_function_data, std::vector::type> &values) { @@ -489,7 +489,7 @@ namespace FEValuesViews // the order of the derivative (= rank of gradient/Hessian tensor) template void - do_function_derivatives (const ArrayView &dof_values, + do_function_derivatives (const ArrayView &dof_values, const Table<2,dealii::Tensor > &shape_derivatives, const std::vector::ShapeFunctionData> &shape_function_data, std::vector >::type> &derivatives) @@ -522,7 +522,7 @@ namespace FEValuesViews template void - do_function_laplacians (const ArrayView &dof_values, + do_function_laplacians (const ArrayView &dof_values, const Table<2,dealii::Tensor<2,spacedim> > &shape_hessians, const std::vector::ShapeFunctionData> &shape_function_data, std::vector::type> &laplacians) @@ -554,7 +554,7 @@ namespace FEValuesViews // ----------------------------- vector part --------------------------- template - void do_function_values (const ArrayView &dof_values, + void do_function_values (const ArrayView &dof_values, const Table<2,double> &shape_values, const std::vector::ShapeFunctionData> &shape_function_data, std::vector >::type> &values) @@ -603,7 +603,7 @@ namespace FEValuesViews template void - do_function_derivatives (const ArrayView &dof_values, + do_function_derivatives (const ArrayView &dof_values, const Table<2,dealii::Tensor > &shape_derivatives, const std::vector::ShapeFunctionData> &shape_function_data, std::vector >::type> &derivatives) @@ -657,7 +657,7 @@ namespace FEValuesViews template void - do_function_symmetric_gradients (const ArrayView &dof_values, + do_function_symmetric_gradients (const ArrayView &dof_values, const Table<2,dealii::Tensor<1,spacedim> > &shape_gradients, const std::vector::ShapeFunctionData> &shape_function_data, std::vector >::type> &symmetric_gradients) @@ -710,7 +710,7 @@ namespace FEValuesViews template void - do_function_divergences (const ArrayView &dof_values, + do_function_divergences (const ArrayView &dof_values, const Table<2,dealii::Tensor<1,spacedim> > &shape_gradients, const std::vector::ShapeFunctionData> &shape_function_data, std::vector::type> &divergences) @@ -760,7 +760,7 @@ namespace FEValuesViews template void - do_function_curls (const ArrayView &dof_values, + do_function_curls (const ArrayView &dof_values, const Table<2,dealii::Tensor<1,spacedim> > &shape_gradients, const std::vector::ShapeFunctionData> &shape_function_data, std::vector::type>::type> &curls) @@ -952,7 +952,7 @@ namespace FEValuesViews template void - do_function_laplacians (const ArrayView &dof_values, + do_function_laplacians (const ArrayView &dof_values, const Table<2,dealii::Tensor<2,spacedim> > &shape_hessians, const std::vector::ShapeFunctionData> &shape_function_data, std::vector >::type> &laplacians) @@ -1006,7 +1006,7 @@ namespace FEValuesViews template void - do_function_values (const ArrayView &dof_values, + do_function_values (const ArrayView &dof_values, const dealii::Table<2,double> &shape_values, const std::vector::ShapeFunctionData> &shape_function_data, std::vector >::type> &values) @@ -1060,7 +1060,7 @@ namespace FEValuesViews template void - do_function_divergences (const ArrayView &dof_values, + do_function_divergences (const ArrayView &dof_values, const Table<2,dealii::Tensor<1,spacedim> > &shape_gradients, const std::vector::ShapeFunctionData> &shape_function_data, std::vector >::type> &divergences) @@ -1148,7 +1148,7 @@ namespace FEValuesViews template void - do_function_values (const ArrayView &dof_values, + do_function_values (const ArrayView &dof_values, const dealii::Table<2,double> &shape_values, const std::vector::ShapeFunctionData> &shape_function_data, std::vector >::type> &values) @@ -1204,7 +1204,7 @@ namespace FEValuesViews template void - do_function_divergences (const ArrayView &dof_values, + do_function_divergences (const ArrayView &dof_values, const Table<2,dealii::Tensor<1,spacedim> > &shape_gradients, const std::vector::ShapeFunctionData> &shape_function_data, std::vector >::type> &divergences) @@ -1282,7 +1282,7 @@ namespace FEValuesViews dealii::Vector dof_values(fe_values->dofs_per_cell); fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values); internal::do_function_values - (ArrayView(&dof_values[0], fe_values->dofs_per_cell), + (make_array_view(dof_values.begin(), dof_values.end()), fe_values->finite_element_output.shape_values, shape_function_data, values); } @@ -1306,7 +1306,7 @@ namespace FEValuesViews dealii::Vector dof_values (fe_values->dofs_per_cell); fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values); internal::do_function_derivatives<1,dim,spacedim> - (ArrayView(&dof_values[0], fe_values->dofs_per_cell), + (make_array_view(dof_values.begin(), dof_values.end()), fe_values->finite_element_output.shape_gradients, shape_function_data, gradients); } @@ -1330,7 +1330,7 @@ namespace FEValuesViews dealii::Vector dof_values (fe_values->dofs_per_cell); fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values); internal::do_function_derivatives<2,dim,spacedim> - (ArrayView(&dof_values[0], fe_values->dofs_per_cell), + (make_array_view(dof_values.begin(), dof_values.end()), fe_values->finite_element_output.shape_hessians, shape_function_data, hessians); } @@ -1354,7 +1354,7 @@ namespace FEValuesViews dealii::Vector dof_values (fe_values->dofs_per_cell); fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values); internal::do_function_laplacians - (ArrayView(&dof_values[0], fe_values->dofs_per_cell), + (make_array_view(dof_values.begin(), dof_values.end()), fe_values->finite_element_output.shape_hessians, shape_function_data, laplacians); } @@ -1378,7 +1378,7 @@ namespace FEValuesViews dealii::Vector dof_values (fe_values->dofs_per_cell); fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values); internal::do_function_derivatives<3,dim,spacedim> - (ArrayView(&dof_values[0], fe_values->dofs_per_cell), + (make_array_view(dof_values.begin(), dof_values.end()), fe_values->finite_element_output.shape_3rd_derivatives, shape_function_data, third_derivatives); } @@ -1402,7 +1402,7 @@ namespace FEValuesViews dealii::Vector dof_values (fe_values->dofs_per_cell); fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values); internal::do_function_values - (ArrayView(&dof_values[0], fe_values->dofs_per_cell), + (make_array_view(dof_values.begin(), dof_values.end()), fe_values->finite_element_output.shape_values, shape_function_data, values); } @@ -1427,7 +1427,7 @@ namespace FEValuesViews dealii::Vector dof_values (fe_values->dofs_per_cell); fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values); internal::do_function_derivatives<1,dim,spacedim> - (ArrayView(&dof_values[0], fe_values->dofs_per_cell), + (make_array_view(dof_values.begin(), dof_values.end()), fe_values->finite_element_output.shape_gradients, shape_function_data, gradients); } @@ -1451,7 +1451,7 @@ namespace FEValuesViews dealii::Vector dof_values (fe_values->dofs_per_cell); fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values); internal::do_function_symmetric_gradients - (ArrayView(&dof_values[0], fe_values->dofs_per_cell), + (make_array_view(dof_values.begin(), dof_values.end()), fe_values->finite_element_output.shape_gradients, shape_function_data, symmetric_gradients); } @@ -1477,7 +1477,7 @@ namespace FEValuesViews dealii::Vector dof_values (fe_values->dofs_per_cell); fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values); internal::do_function_divergences - (ArrayView(&dof_values[0], fe_values->dofs_per_cell), + (make_array_view(dof_values.begin(), dof_values.end()), fe_values->finite_element_output.shape_gradients, shape_function_data, divergences); } @@ -1499,7 +1499,7 @@ namespace FEValuesViews dealii::Vector dof_values (fe_values->dofs_per_cell); fe_values->present_cell->get_interpolated_dof_values (fe_function, dof_values); internal::do_function_curls - (ArrayView(&dof_values[0], fe_values->dofs_per_cell), + (make_array_view(dof_values.begin(), dof_values.end()), fe_values->finite_element_output.shape_gradients, shape_function_data, curls); } @@ -1522,7 +1522,7 @@ namespace FEValuesViews dealii::Vector dof_values (fe_values->dofs_per_cell); fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values); internal::do_function_derivatives<2,dim,spacedim> - (ArrayView(&dof_values[0], fe_values->dofs_per_cell), + (make_array_view(dof_values.begin(), dof_values.end()), fe_values->finite_element_output.shape_hessians, shape_function_data, hessians); } @@ -1549,7 +1549,7 @@ namespace FEValuesViews dealii::Vector dof_values (fe_values->dofs_per_cell); fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values); internal::do_function_laplacians - (ArrayView(&dof_values[0], fe_values->dofs_per_cell), + (make_array_view(dof_values.begin(), dof_values.end()), fe_values->finite_element_output.shape_hessians, shape_function_data, laplacians); } @@ -1572,7 +1572,7 @@ namespace FEValuesViews dealii::Vector dof_values (fe_values->dofs_per_cell); fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values); internal::do_function_derivatives<3,dim,spacedim> - (ArrayView(&dof_values[0], fe_values->dofs_per_cell), + (make_array_view(dof_values.begin(), dof_values.end()), fe_values->finite_element_output.shape_3rd_derivatives, shape_function_data, third_derivatives); } @@ -1596,7 +1596,7 @@ namespace FEValuesViews dealii::Vector dof_values(fe_values->dofs_per_cell); fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values); internal::do_function_values - (ArrayView(&dof_values[0], fe_values->dofs_per_cell), + (make_array_view(dof_values.begin(), dof_values.end()), fe_values->finite_element_output.shape_values, shape_function_data, values); } @@ -1621,7 +1621,7 @@ namespace FEValuesViews dealii::Vector dof_values(fe_values->dofs_per_cell); fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values); internal::do_function_divergences - (ArrayView(&dof_values[0], fe_values->dofs_per_cell), + (make_array_view(dof_values.begin(), dof_values.end()), fe_values->finite_element_output.shape_gradients, shape_function_data, divergences); } @@ -1643,7 +1643,7 @@ namespace FEValuesViews dealii::Vector dof_values(fe_values->dofs_per_cell); fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values); internal::do_function_values - (ArrayView(&dof_values[0], fe_values->dofs_per_cell), + (make_array_view(dof_values.begin(), dof_values.end()), fe_values->finite_element_output.shape_values, shape_function_data, values); } @@ -1668,7 +1668,7 @@ namespace FEValuesViews dealii::Vector dof_values(fe_values->dofs_per_cell); fe_values->present_cell->get_interpolated_dof_values(fe_function, dof_values); internal::do_function_divergences - (ArrayView(&dof_values[0], fe_values->dofs_per_cell), + (make_array_view(dof_values.begin(), dof_values.end()), fe_values->finite_element_output.shape_gradients, shape_function_data, divergences); } }