From ec45c049bff115a9ac98cbefafdffb535d3d61a0 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 28 Feb 2015 11:52:04 +0100 Subject: [PATCH] Convert FEValuesView::Vector to allow for generic types. --- include/deal.II/fe/fe_values.h | 14 +++++++------- source/fe/fe_values.cc | 28 ++++++++++++++-------------- source/fe/fe_values.inst.in | 28 ++++++++++++++-------------- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/include/deal.II/fe/fe_values.h b/include/deal.II/fe/fe_values.h index 0c55d046cd..45f85cabf5 100644 --- a/include/deal.II/fe/fe_values.h +++ b/include/deal.II/fe/fe_values.h @@ -626,7 +626,7 @@ namespace FEValuesViews */ template void get_function_values (const InputVector &fe_function, - std::vector &values) const; + std::vector::type> &values) const; /** * Return the gradients of the selected vector components of the finite @@ -642,7 +642,7 @@ namespace FEValuesViews */ template void get_function_gradients (const InputVector &fe_function, - std::vector &gradients) const; + std::vector::type> &gradients) const; /** * Return the symmetrized gradients of the selected vector components of @@ -664,7 +664,7 @@ namespace FEValuesViews template void get_function_symmetric_gradients (const InputVector &fe_function, - std::vector &symmetric_gradients) const; + std::vector::type> &symmetric_gradients) const; /** * Return the divergence of the selected vector components of the finite @@ -681,7 +681,7 @@ namespace FEValuesViews */ template void get_function_divergences (const InputVector &fe_function, - std::vector &divergences) const; + std::vector::type> &divergences) const; /** * Return the curl of the selected vector components of the finite element @@ -698,7 +698,7 @@ namespace FEValuesViews */ template void get_function_curls (const InputVector &fe_function, - std::vector &curls) const; + std::vector::type> &curls) const; /** * Return the Hessians of the selected vector components of the finite @@ -714,7 +714,7 @@ namespace FEValuesViews */ template void get_function_hessians (const InputVector &fe_function, - std::vector &hessians) const; + std::vector::type> &hessians) const; /** * Return the Laplacians of the selected vector components of the finite @@ -731,7 +731,7 @@ namespace FEValuesViews */ template void get_function_laplacians (const InputVector &fe_function, - std::vector &laplacians) const; + std::vector::type> &laplacians) const; private: /** diff --git a/source/fe/fe_values.cc b/source/fe/fe_values.cc index 04536aff69..f3f3a515a3 100644 --- a/source/fe/fe_values.cc +++ b/source/fe/fe_values.cc @@ -1358,7 +1358,7 @@ namespace FEValuesViews void Vector:: get_function_values (const InputVector &fe_function, - std::vector &values) const + std::vector::type> &values) const { typedef FEValuesBase FVB; Assert (fe_values.update_flags & update_values, @@ -1369,7 +1369,7 @@ namespace FEValuesViews fe_values.present_cell->n_dofs_for_dof_handler()); // get function values of dofs on this cell - dealii::Vector dof_values (fe_values.dofs_per_cell); + 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 (dof_values, fe_values.shape_values, shape_function_data, values); @@ -1383,7 +1383,7 @@ namespace FEValuesViews void Vector:: get_function_gradients (const InputVector &fe_function, - std::vector &gradients) const + std::vector::type> &gradients) const { typedef FEValuesBase FVB; Assert (fe_values.update_flags & update_gradients, @@ -1394,7 +1394,7 @@ namespace FEValuesViews fe_values.present_cell->n_dofs_for_dof_handler()); // get function values of dofs on this cell - dealii::Vector dof_values (fe_values.dofs_per_cell); + 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> (dof_values, fe_values.shape_gradients, shape_function_data, gradients); @@ -1407,7 +1407,7 @@ namespace FEValuesViews void Vector:: get_function_symmetric_gradients (const InputVector &fe_function, - std::vector &symmetric_gradients) const + std::vector::type> &symmetric_gradients) const { typedef FEValuesBase FVB; Assert (fe_values.update_flags & update_gradients, @@ -1418,7 +1418,7 @@ namespace FEValuesViews fe_values.present_cell->n_dofs_for_dof_handler()); // get function values of dofs on this cell - dealii::Vector dof_values (fe_values.dofs_per_cell); + 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 (dof_values, fe_values.shape_gradients, shape_function_data, @@ -1432,7 +1432,7 @@ namespace FEValuesViews void Vector:: get_function_divergences (const InputVector &fe_function, - std::vector &divergences) const + std::vector::type> &divergences) const { typedef FEValuesBase FVB; Assert (fe_values.update_flags & update_gradients, @@ -1444,7 +1444,7 @@ namespace FEValuesViews // get function values of dofs // on this cell - dealii::Vector dof_values (fe_values.dofs_per_cell); + 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 (dof_values, fe_values.shape_gradients, shape_function_data, divergences); @@ -1455,7 +1455,7 @@ namespace FEValuesViews void Vector:: get_function_curls (const InputVector &fe_function, - std::vector &curls) const + std::vector::type> &curls) const { typedef FEValuesBase FVB; @@ -1467,7 +1467,7 @@ namespace FEValuesViews fe_values.present_cell->n_dofs_for_dof_handler ()); // get function values of dofs on this cell - dealii::Vector dof_values (fe_values.dofs_per_cell); + 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 (dof_values, fe_values.shape_gradients, shape_function_data, curls); @@ -1479,7 +1479,7 @@ namespace FEValuesViews void Vector:: get_function_hessians (const InputVector &fe_function, - std::vector &hessians) const + std::vector::type> &hessians) const { typedef FEValuesBase FVB; Assert (fe_values.update_flags & update_hessians, @@ -1490,7 +1490,7 @@ namespace FEValuesViews fe_values.present_cell->n_dofs_for_dof_handler()); // get function values of dofs on this cell - dealii::Vector dof_values (fe_values.dofs_per_cell); + 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> (dof_values, fe_values.shape_hessians, shape_function_data, hessians); @@ -1503,7 +1503,7 @@ namespace FEValuesViews void Vector:: get_function_laplacians (const InputVector &fe_function, - std::vector &laplacians) const + std::vector::type> &laplacians) const { typedef FEValuesBase FVB; Assert (fe_values.update_flags & update_hessians, @@ -1517,7 +1517,7 @@ namespace FEValuesViews fe_values.present_cell->n_dofs_for_dof_handler())); // get function values of dofs on this cell - dealii::Vector dof_values (fe_values.dofs_per_cell); + 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 (dof_values, fe_values.shape_hessians, shape_function_data, laplacians); diff --git a/source/fe/fe_values.inst.in b/source/fe/fe_values.inst.in index 61716fa11f..7973bb67fd 100644 --- a/source/fe/fe_values.inst.in +++ b/source/fe/fe_values.inst.in @@ -87,31 +87,31 @@ for (VEC : SERIAL_VECTORS; deal_II_dimension : DIMENSIONS; deal_II_space_dimensi template void FEValuesViews::Vector ::get_function_values - (const dealii::VEC&, std::vector >&) const; + (const dealii::VEC&, std::vector>::type >&) const; template void FEValuesViews::Vector ::get_function_gradients - (const dealii::VEC&, std::vector >&) const; + (const dealii::VEC&, std::vector>::type >&) const; template void FEValuesViews::Vector ::get_function_symmetric_gradients - (const dealii::VEC&, std::vector >&) const; + (const dealii::VEC&, std::vector>::type >&) const; template void FEValuesViews::Vector ::get_function_curls - (const dealii::VEC&, std::vector&) const; + (const dealii::VEC&, std::vector::type>&) const; template void FEValuesViews::Vector ::get_function_divergences - (const dealii::VEC&, std::vector&) const; + (const dealii::VEC&, std::vector::type>&) const; template void FEValuesViews::Vector ::get_function_hessians - (const dealii::VEC&, std::vector >&) const; + (const dealii::VEC&, std::vector>::type >&) const; template void FEValuesViews::Vector ::get_function_laplacians - (const dealii::VEC&, std::vector >&) const; + (const dealii::VEC&, std::vector>::type >&) const; template void FEValuesViews::SymmetricTensor<2, deal_II_dimension, deal_II_space_dimension> @@ -274,25 +274,25 @@ for (deal_II_dimension : DIMENSIONS) template void FEValuesViews::Vector::get_function_values - (const dealii::IndexSet&, std::vector >&) const; + (const dealii::IndexSet&, std::vector >::type>&) const; template void FEValuesViews::Vector::get_function_gradients - (const dealii::IndexSet&, std::vector >&) const; + (const dealii::IndexSet&, std::vector >::type>&) const; template void FEValuesViews::Vector::get_function_symmetric_gradients - (const dealii::IndexSet&, std::vector >&) const; + (const dealii::IndexSet&, std::vector >::type>&) const; template void FEValuesViews::Vector::get_function_curls - (const dealii::IndexSet&, std::vector&) const; + (const dealii::IndexSet&, std::vector::type>&) const; template void FEValuesViews::Vector::get_function_divergences - (const dealii::IndexSet&, std::vector&) const; + (const dealii::IndexSet&, std::vector::type>&) const; template void FEValuesViews::Vector::get_function_hessians - (const dealii::IndexSet&, std::vector >&) const; + (const dealii::IndexSet&, std::vector >::type>&) const; template void FEValuesViews::Vector::get_function_laplacians - (const dealii::IndexSet&, std::vector >&) const; + (const dealii::IndexSet&, std::vector >::type>&) const; template void FEValuesViews::SymmetricTensor<2,deal_II_dimension,deal_II_dimension>::get_function_values -- 2.39.5