]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Added Vector::get_function_curls_from_local_dof_values
authorJean-Paul Pelteret <jppelteret@gmail.com>
Thu, 10 Aug 2017 22:58:33 +0000 (16:58 -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 45b8dd946390e4b3b781bb86bf9a24fd80912c17..5e0a67a7d30bb956c35cedf1d5562cf11ebb57a9 100644 (file)
@@ -981,6 +981,13 @@ namespace FEValuesViews
     void get_function_curls (const InputVector &fe_function,
                              std::vector<typename ProductType<curl_type,typename InputVector::value_type>::type> &curls) const;
 
+    /**
+     * @copydoc FEValuesViews::Vector::get_function_values_from_local_dof_values()
+     */
+    template <class InputVector>
+    void get_function_curls_from_local_dof_values (const InputVector &dof_values,
+                                                   std::vector<typename OutputType<typename InputVector::value_type>::curl_type> &curls) const;
+
     /**
      * Return the Hessians of the selected vector components of the finite
      * element function characterized by <tt>fe_function</tt> at the
index 9650c53a6f872dddf3de206f62890f81404c9f51..0c21e831ddf4b7e7fff585751a530e8c67780476 100644 (file)
@@ -1688,6 +1688,27 @@ namespace FEValuesViews
   }
 
 
+
+  template <int dim, int spacedim>
+  template <class InputVector>
+  void
+  Vector<dim,spacedim>::
+  get_function_curls_from_local_dof_values(const InputVector &dof_values,
+                                           std::vector<typename OutputType<typename InputVector::value_type>::curl_type> &curls) const
+  {
+    Assert (fe_values->update_flags & update_gradients,
+            (typename FEValuesBase<dim,spacedim>::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<dim,spacedim>
+    (make_array_view(dof_values.begin(), dof_values.end()),
+     fe_values->finite_element_output.shape_gradients, shape_function_data, curls);
+  }
+
+
+
   template <int dim, int spacedim>
   template <class InputVector>
   void
index 8d3ab27c5bd97f9fd6d1df23aee381416001ab3f..8880b3d449ea40175ebc219bd7a6863c97baa020 100644 (file)
@@ -191,6 +191,11 @@ for (VEC : GENERAL_CONTAINER_TYPES;
     void FEValuesViews::Vector<deal_II_dimension, deal_II_space_dimension>
     ::get_function_divergences_from_local_dof_values<VEC<Number>>
             (const VEC<Number>&, std::vector<typename OutputType<Number>::divergence_type>&) const;
+
+    template
+    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;
 #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.