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

index 77a6639005f9d3d9cfe84dbb8570a624ff69b365..3b6b591c9ac93157108b46691b7ee986439d43e0 100644 (file)
@@ -402,6 +402,14 @@ 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::Scalar::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 scalar component of the finite
      * element function characterized by <tt>fe_function</tt> at the
index c890974cf6e5d4c49b28305d30c1c4878cb73c17..496042749c73f1fba91d6b35bc4015cc8e442807 100644 (file)
@@ -1376,6 +1376,26 @@ namespace FEValuesViews
 
 
 
+  template <int dim, int spacedim>
+  template <class InputVector>
+  void
+  Scalar<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 ae54b4cd4b85c8cae9cadae28b21f2b201b4b2a1..cc403b24d4f4ac12467871d1b1b7c77a7e81130a 100644 (file)
@@ -154,6 +154,11 @@ for (VEC : GENERAL_CONTAINER_TYPES;
     void FEValuesViews::Scalar<deal_II_dimension, deal_II_space_dimension>
     ::get_function_gradients_from_local_dof_values<VEC<Number>>
             (const VEC<Number>&, std::vector<typename OutputType<Number>::gradient_type>&) const;
+
+    template
+    void FEValuesViews::Scalar<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.