]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove deprecated function FEValuesBase::get_normal_vectors().
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 25 Apr 2017 21:21:37 +0000 (15:21 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 26 Apr 2017 17:04:14 +0000 (11:04 -0600)
At the same time, recreate it with a different return type.

include/deal.II/fe/fe_values.h
source/fe/fe_values.cc

index 7e52a0ea396b553973b7326c1b3749bdf93d3396..564685705f6947112741d20b3d84b64274a3cc17 100644 (file)
@@ -2406,27 +2406,19 @@ public:
    *
    * @dealiiRequiresUpdateFlags{update_normal_vectors}
    *
-   * @note This function should really be named get_normal_vectors(), but this
-   * function already exists with a different return type that returns a
-   * vector of Point objects, rather than a vector of Tensor objects. This is
-   * a historical accident, but can not be fixed in a backward compatible
-   * style. That said, the get_normal_vectors() function is now deprecated,
-   * will be removed in the next version, and the current function will then
-   * be renamed.
+   * @deprecated Use get_normal_vectors() instead, which returns the exact
+   * same thing.
    */
-  const std::vector<Tensor<1,spacedim> > &get_all_normal_vectors () const;
+  const std::vector<Tensor<1,spacedim> > &get_all_normal_vectors () const DEAL_II_DEPRECATED;
 
   /**
-   * Return the normal vectors at the quadrature points as a vector of Point
-   * objects. This function is deprecated because normal vectors are correctly
-   * represented by rank-1 Tensor objects, not Point objects. Use
-   * get_all_normal_vectors() instead.
+   * Return the normal vectors at the quadrature points. For a face, these are
+   * the outward normal vectors to the cell. For a cell of codimension one,
+   * the orientation is given by the numbering of vertices.
    *
    * @dealiiRequiresUpdateFlags{update_normal_vectors}
-   *
-   * @deprecated
    */
-  std::vector<Point<spacedim> > get_normal_vectors () const DEAL_II_DEPRECATED;
+  const std::vector<Tensor<1,spacedim> > &get_normal_vectors () const;
 
   /**
    * Transform a set of vectors, one for each quadrature point. The
index a0ec6532a07e96448ed9d4163a886fc6072c1069..8b0b59f345e6a1a806bf2af83d9fc52c6f1ea132 100644 (file)
@@ -3375,24 +3375,19 @@ FEValuesBase<dim,spacedim>::get_all_normal_vectors () const
 {
   Assert (this->update_flags & update_normal_vectors,
           (typename FEValuesBase<dim,spacedim>::ExcAccessToUninitializedField("update_normal_vectors")));
-  return this->mapping_output.normal_vectors;
+  return get_normal_vectors();
 }
 
 
 
 template <int dim, int spacedim>
-std::vector<Point<spacedim> >
+const std::vector<Tensor<1,spacedim> > &
 FEValuesBase<dim,spacedim>::get_normal_vectors () const
 {
   Assert (this->update_flags & update_normal_vectors,
           (typename FEValuesBase<dim,spacedim>::ExcAccessToUninitializedField("update_normal_vectors")));
 
-  // copy things into a vector of Points, then return that
-  std::vector<Point<spacedim> > tmp (this->mapping_output.normal_vectors.size());
-  for (unsigned int q=0; q<this->mapping_output.normal_vectors.size(); ++q)
-    tmp[q] = Point<spacedim>(this->mapping_output.normal_vectors[q]);
-
-  return tmp;
+  return this->mapping_output.normal_vectors;
 }
 
 

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.