From: Jean-Paul Pelteret Date: Thu, 10 Aug 2017 22:58:33 +0000 (-0600) Subject: Added Vector::get_function_curls_from_local_dof_values X-Git-Tag: v9.0.0-rc1~1291^2~9 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f12e8f6363b7d3769baf025c7f37ac58946c88fe;p=dealii.git Added Vector::get_function_curls_from_local_dof_values --- diff --git a/include/deal.II/fe/fe_values.h b/include/deal.II/fe/fe_values.h index 45b8dd9463..5e0a67a7d3 100644 --- a/include/deal.II/fe/fe_values.h +++ b/include/deal.II/fe/fe_values.h @@ -981,6 +981,13 @@ namespace FEValuesViews void get_function_curls (const InputVector &fe_function, std::vector::type> &curls) const; + /** + * @copydoc FEValuesViews::Vector::get_function_values_from_local_dof_values() + */ + template + void get_function_curls_from_local_dof_values (const InputVector &dof_values, + std::vector::curl_type> &curls) const; + /** * Return the Hessians 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 9650c53a6f..0c21e831dd 100644 --- a/source/fe/fe_values.cc +++ b/source/fe/fe_values.cc @@ -1688,6 +1688,27 @@ namespace FEValuesViews } + + template + template + void + Vector:: + get_function_curls_from_local_dof_values(const InputVector &dof_values, + std::vector::curl_type> &curls) const + { + Assert (fe_values->update_flags & update_gradients, + (typename FEValuesBase::ExcAccessToUninitializedField("update_gradients"))); + Assert (fe_values->present_cell.get () != nullptr, + ExcMessage ("FEValues object is not reinited to any cell")); + AssertDimension (dof_values.size(), fe_values->dofs_per_cell); + + internal::do_function_curls + (make_array_view(dof_values.begin(), dof_values.end()), + fe_values->finite_element_output.shape_gradients, shape_function_data, curls); + } + + + template template void diff --git a/source/fe/fe_values.inst.in b/source/fe/fe_values.inst.in index 8d3ab27c5b..8880b3d449 100644 --- a/source/fe/fe_values.inst.in +++ b/source/fe/fe_values.inst.in @@ -191,6 +191,11 @@ for (VEC : GENERAL_CONTAINER_TYPES; void FEValuesViews::Vector ::get_function_divergences_from_local_dof_values> (const VEC&, std::vector::divergence_type>&) const; + + template + void FEValuesViews::Vector + ::get_function_curls_from_local_dof_values> + (const VEC&, std::vector::curl_type>&) const; #endif }