From ac796066ca07acb2a3d3a86ad4083f2f4b9d29c4 Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Thu, 10 Aug 2017 16:54:51 -0600 Subject: [PATCH] Added Scalar::get_function_third_derivatives_from_local_dof_values --- include/deal.II/fe/fe_values.h | 8 ++++++++ source/fe/fe_values.cc | 20 ++++++++++++++++++++ source/fe/fe_values.inst.in | 5 +++++ 3 files changed, 33 insertions(+) diff --git a/include/deal.II/fe/fe_values.h b/include/deal.II/fe/fe_values.h index e17caaf5cc..e4f5b920e7 100644 --- a/include/deal.II/fe/fe_values.h +++ b/include/deal.II/fe/fe_values.h @@ -463,6 +463,14 @@ namespace FEValuesViews std::vector::type> &third_derivatives) const; + /** + * @copydoc FEValuesViews::Scalar::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 3f67cd9e3d..c26294d7ba 100644 --- a/source/fe/fe_values.cc +++ b/source/fe/fe_values.cc @@ -1465,6 +1465,26 @@ namespace FEValuesViews + template + template + void + Scalar:: + 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 067db65566..69c7931298 100644 --- a/source/fe/fe_values.inst.in +++ b/source/fe/fe_values.inst.in @@ -164,6 +164,11 @@ for (VEC : GENERAL_CONTAINER_TYPES; void FEValuesViews::Scalar ::get_function_laplacians_from_local_dof_values> (const VEC&, std::vector::value_type>&) const; + + template + void FEValuesViews::Scalar + ::get_function_third_derivatives_from_local_dof_values> + (const VEC&, std::vector::third_derivative_type>&) const; #endif } -- 2.39.5