]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Added Vector::get_function_hessians_from_local_dof_values
authorJean-Paul Pelteret <jppelteret@gmail.com>
Thu, 10 Aug 2017 22:59:03 +0000 (16:59 -0600)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Sat, 12 Aug 2017 17:09:32 +0000 (11:09 -0600)
include/deal.II/fe/fe_values.h
source/fe/fe_values.cc
source/fe/fe_values.inst.in

index 5e0a67a7d30bb956c35cedf1d5562cf11ebb57a9..80f6a1739a038bc4051e1f12f70b03fd4f5f9a9c 100644 (file)
@@ -1009,6 +1009,13 @@ namespace FEValuesViews
     void get_function_hessians (const InputVector &fe_function,
                                 std::vector<typename ProductType<hessian_type,typename InputVector::value_type>::type> &hessians) const;
 
+    /**
+     * @copydoc FEValuesViews::Vector::get_function_values_from_local_dof_values()
+     */
+    template <class InputVector>
+    void get_function_hessians_from_local_dof_values (const InputVector &dof_values,
+                                                      std::vector<typename OutputType<typename InputVector::value_type>::hessian_type> &hessians) const;
+
     /**
      * Return the Laplacians of the selected vector components of the finite
      * element function characterized by <tt>fe_function</tt> at the
index 0c21e831ddf4b7e7fff585751a530e8c67780476..9eb65c5cc8e1b76408b859e051ffdadc8e0af908 100644 (file)
@@ -1733,6 +1733,26 @@ namespace FEValuesViews
 
 
 
+  template <int dim, int spacedim>
+  template <class InputVector>
+  void
+  Vector<dim,spacedim>::
+  get_function_hessians_from_local_dof_values (const InputVector &dof_values,
+                                               std::vector<typename OutputType<typename InputVector::value_type>::hessian_type> &hessians) const
+  {
+    Assert (fe_values->update_flags & update_hessians,
+            (typename FEValuesBase<dim,spacedim>::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 <int dim, int spacedim>
   template <class InputVector>
   void
index 8880b3d449ea40175ebc219bd7a6863c97baa020..416d30bd6f05a9c48869f2c677d2e57f66e0ebe7 100644 (file)
@@ -196,6 +196,11 @@ for (VEC : GENERAL_CONTAINER_TYPES;
     void FEValuesViews::Vector<deal_II_dimension, deal_II_space_dimension>
     ::get_function_curls_from_local_dof_values<VEC<Number>>
             (const VEC<Number>&, std::vector<typename OutputType<Number>::curl_type>&) const;
+
+    template
+    void FEValuesViews::Vector<deal_II_dimension, deal_II_space_dimension>
+    ::get_function_hessians_from_local_dof_values<VEC<Number>>
+            (const VEC<Number>&, std::vector<typename OutputType<Number>::hessian_type>&) const;
 #endif
 }
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.