From: Jean-Paul Pelteret Date: Thu, 10 Aug 2017 22:59:03 +0000 (-0600) Subject: Added Vector::get_function_hessians_from_local_dof_values X-Git-Tag: v9.0.0-rc1~1291^2~8 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e80e801b20d66561b2de310ec24e96e936e96dcb;p=dealii.git Added Vector::get_function_hessians_from_local_dof_values --- diff --git a/include/deal.II/fe/fe_values.h b/include/deal.II/fe/fe_values.h index 5e0a67a7d3..80f6a1739a 100644 --- a/include/deal.II/fe/fe_values.h +++ b/include/deal.II/fe/fe_values.h @@ -1009,6 +1009,13 @@ namespace FEValuesViews void get_function_hessians (const InputVector &fe_function, std::vector::type> &hessians) const; + /** + * @copydoc FEValuesViews::Vector::get_function_values_from_local_dof_values() + */ + template + void get_function_hessians_from_local_dof_values (const InputVector &dof_values, + std::vector::hessian_type> &hessians) const; + /** * Return the Laplacians of the selected vector components of the finite * element function characterized by fe_function at the diff --git a/source/fe/fe_values.cc b/source/fe/fe_values.cc index 0c21e831dd..9eb65c5cc8 100644 --- a/source/fe/fe_values.cc +++ b/source/fe/fe_values.cc @@ -1733,6 +1733,26 @@ namespace FEValuesViews + template + template + void + Vector:: + get_function_hessians_from_local_dof_values (const InputVector &dof_values, + std::vector::hessian_type> &hessians) const + { + Assert (fe_values->update_flags & update_hessians, + (typename FEValuesBase::ExcAccessToUninitializedField("update_hessians"))); + 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<2,dim,spacedim> + (make_array_view(dof_values.begin(), dof_values.end()), + fe_values->finite_element_output.shape_hessians, shape_function_data, hessians); + } + + + template template void diff --git a/source/fe/fe_values.inst.in b/source/fe/fe_values.inst.in index 8880b3d449..416d30bd6f 100644 --- a/source/fe/fe_values.inst.in +++ b/source/fe/fe_values.inst.in @@ -196,6 +196,11 @@ for (VEC : GENERAL_CONTAINER_TYPES; void FEValuesViews::Vector ::get_function_curls_from_local_dof_values> (const VEC&, std::vector::curl_type>&) const; + + template + void FEValuesViews::Vector + ::get_function_hessians_from_local_dof_values> + (const VEC&, std::vector::hessian_type>&) const; #endif }