From d1aa21324d3a829bc3e59831cd736ab3d6ecc0b1 Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Thu, 10 Aug 2017 17:00:11 -0600 Subject: [PATCH] Added Vector::get_function_third_derivatives_from_local_dof_values --- include/deal.II/fe/fe_values.h | 7 +++++++ source/fe/fe_values.cc | 20 ++++++++++++++++++++ source/fe/fe_values.inst.in | 5 +++++ 3 files changed, 32 insertions(+) diff --git a/include/deal.II/fe/fe_values.h b/include/deal.II/fe/fe_values.h index b23b7de42b..6711ca8a42 100644 --- a/include/deal.II/fe/fe_values.h +++ b/include/deal.II/fe/fe_values.h @@ -1068,6 +1068,13 @@ namespace FEValuesViews std::vector::type> &third_derivatives) const; + /** + * @copydoc FEValuesViews::Vector::get_function_values_from_local_dof_values() + */ + template + void get_function_third_derivatives_from_local_dof_values (const InputVector &dof_values, + std::vector::third_derivative_type> &third_derivatives) const; + private: /** * A pointer to the FEValuesBase object we operate on. diff --git a/source/fe/fe_values.cc b/source/fe/fe_values.cc index 908e774288..1109991033 100644 --- a/source/fe/fe_values.cc +++ b/source/fe/fe_values.cc @@ -1826,6 +1826,26 @@ namespace FEValuesViews + template + template + void + Vector:: + get_function_third_derivatives_from_local_dof_values(const InputVector &dof_values, + std::vector::third_derivative_type> &third_derivatives) const + { + Assert (fe_values->update_flags & update_3rd_derivatives, + (typename FEValuesBase::ExcAccessToUninitializedField("update_3rd_derivatives"))); + Assert (fe_values->present_cell.get() != nullptr, + ExcMessage ("FEValues object is not reinit'ed to any cell")); + AssertDimension (dof_values.size(), fe_values->dofs_per_cell); + + internal::do_function_derivatives<3,dim,spacedim> + (make_array_view(dof_values.begin(), dof_values.end()), + fe_values->finite_element_output.shape_3rd_derivatives, shape_function_data, third_derivatives); + } + + + template template void diff --git a/source/fe/fe_values.inst.in b/source/fe/fe_values.inst.in index 7ed95a20e8..75f90d0c49 100644 --- a/source/fe/fe_values.inst.in +++ b/source/fe/fe_values.inst.in @@ -206,6 +206,11 @@ for (VEC : GENERAL_CONTAINER_TYPES; void FEValuesViews::Vector ::get_function_laplacians_from_local_dof_values> (const VEC&, std::vector::value_type>&) const; + + template + void FEValuesViews::Vector + ::get_function_third_derivatives_from_local_dof_values> + (const VEC&, std::vector::third_derivative_type>&) const; #endif } -- 2.39.5