]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Deprecate ArrayView functionality for tensors.
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 20 Aug 2021 20:54:41 +0000 (14:54 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 27 Aug 2021 04:08:31 +0000 (22:08 -0600)
include/deal.II/base/array_view.h
include/deal.II/base/symmetric_tensor.h
include/deal.II/base/tensor.h

index af39436d06e58936b1bd552f32e3a6a9104fea09..f38a7d14ae3e880dd493b03c5a49e79d029e9afd 100644 (file)
@@ -787,10 +787,15 @@ make_array_view(ArrayView<Number, MemorySpaceType> &array_view)
  * order in which the entries are presented in the array is an implementation
  * detail and should not be relied upon.
  *
+ * @deprecated This function suggests that the elements of a Tensor
+ *   object are stored as a contiguous array, but this is not in fact true
+ *   and one should not pretend that this so. As a consequence, this function
+ *   is deprecated.
+ *
  * @relatesalso ArrayView
  */
 template <int rank, int dim, typename Number>
-inline ArrayView<const Number>
+DEAL_II_DEPRECATED_EARLY inline ArrayView<const Number>
 make_array_view(const Tensor<rank, dim, Number> &tensor)
 {
   return make_array_view(tensor.begin_raw(), tensor.end_raw());
@@ -812,10 +817,15 @@ make_array_view(const Tensor<rank, dim, Number> &tensor)
  * order in which the entries are presented in the array is an implementation
  * detail and should not be relied upon.
  *
+ * @deprecated This function suggests that the elements of a Tensor
+ *   object are stored as a contiguous array, but this is not in fact true
+ *   and one should not pretend that this so. As a consequence, this function
+ *   is deprecated.
+ *
  * @relatesalso ArrayView
  */
 template <int rank, int dim, typename Number>
-inline ArrayView<Number>
+DEAL_II_DEPRECATED_EARLY inline ArrayView<Number>
 make_array_view(Tensor<rank, dim, Number> &tensor)
 {
   return make_array_view(tensor.begin_raw(), tensor.end_raw());
@@ -837,10 +847,15 @@ make_array_view(Tensor<rank, dim, Number> &tensor)
  * the order in which the entries are presented in the array is an
  * implementation detail and should not be relied upon.
  *
+ * @deprecated This function suggests that the elements of a SymmetricTensor
+ *   object are stored as a contiguous array, but this is not in fact true
+ *   and one should not pretend that this so. As a consequence, this function
+ *   is deprecated.
+ *
  * @relatesalso ArrayView
  */
 template <int rank, int dim, typename Number>
-inline ArrayView<const Number>
+DEAL_II_DEPRECATED_EARLY inline ArrayView<const Number>
 make_array_view(const SymmetricTensor<rank, dim, Number> &tensor)
 {
   return make_array_view(tensor.begin_raw(), tensor.end_raw());
@@ -863,10 +878,15 @@ make_array_view(const SymmetricTensor<rank, dim, Number> &tensor)
  * the order in which the entries are presented in the array is an
  * implementation detail and should not be relied upon.
  *
+ * @deprecated This function suggests that the elements of a SymmetricTensor
+ *   object are stored as a contiguous array, but this is not in fact true
+ *   and one should not pretend that this so. As a consequence, this function
+ *   is deprecated.
+ *
  * @relatesalso ArrayView
  */
 template <int rank, int dim, typename Number>
-inline ArrayView<Number>
+DEAL_II_DEPRECATED_EARLY inline ArrayView<Number>
 make_array_view(SymmetricTensor<rank, dim, Number> &tensor)
 {
   return make_array_view(tensor.begin_raw(), tensor.end_raw());
index 60a61ed182c058185d729a44c28e9f51cd6a1714..5e539e737048d16c01e34ac633a2c86905d4e77e 100644 (file)
@@ -746,26 +746,50 @@ public:
 
   /**
    * Return a pointer to the first element of the underlying storage.
+   *
+   * @deprecated This function suggests that the elements of a SymmetricTensor
+   *   object are stored as a contiguous array, but this is not in fact true
+   *   and one should not pretend that this so. As a consequence, this function
+   *   is deprecated.
    */
+  DEAL_II_DEPRECATED_EARLY
   Number *
   begin_raw();
 
   /**
    * Return a const pointer to the first element of the underlying storage.
+   *
+   * @deprecated This function suggests that the elements of a SymmetricTensor
+   *   object are stored as a contiguous array, but this is not in fact true
+   *   and one should not pretend that this so. As a consequence, this function
+   *   is deprecated.
    */
+  DEAL_II_DEPRECATED_EARLY
   const Number *
   begin_raw() const;
 
   /**
    * Return a pointer to the element past the end of the underlying storage.
+   *
+   * @deprecated This function suggests that the elements of a SymmetricTensor
+   *   object are stored as a contiguous array, but this is not in fact true
+   *   and one should not pretend that this so. As a consequence, this function
+   *   is deprecated.
    */
+  DEAL_II_DEPRECATED_EARLY
   Number *
   end_raw();
 
   /**
    * Return a const pointer to the element past the end of the underlying
    * storage.
+   *
+   * @deprecated This function suggests that the elements of a SymmetricTensor
+   *   object are stored as a contiguous array, but this is not in fact true
+   *   and one should not pretend that this so. As a consequence, this function
+   *   is deprecated.
    */
+  DEAL_II_DEPRECATED_EARLY
   const Number *
   end_raw() const;
 
index a6617dd6a95b46fa31862716551efc789a866ea7..d4fd088aa5a37bb54619401cbf0dec26be3ac96c 100644 (file)
@@ -182,26 +182,50 @@ public:
 
   /**
    * Return a pointer to the first element of the underlying storage.
+   *
+   * @deprecated This function suggests that the elements of a Tensor
+   *   object are stored as a contiguous array, but this is not in fact true
+   *   and one should not pretend that this so. As a consequence, this function
+   *   is deprecated.
    */
+  DEAL_II_DEPRECATED_EARLY
   Number *
   begin_raw();
 
   /**
    * Return a const pointer to the first element of the underlying storage.
+   *
+   * @deprecated This function suggests that the elements of a Tensor
+   *   object are stored as a contiguous array, but this is not in fact true
+   *   and one should not pretend that this so. As a consequence, this function
+   *   is deprecated.
    */
+  DEAL_II_DEPRECATED_EARLY
   const Number *
   begin_raw() const;
 
   /**
    * Return a pointer to the element past the end of the underlying storage.
+   *
+   * @deprecated This function suggests that the elements of a Tensor
+   *   object are stored as a contiguous array, but this is not in fact true
+   *   and one should not pretend that this so. As a consequence, this function
+   *   is deprecated.
    */
+  DEAL_II_DEPRECATED_EARLY
   Number *
   end_raw();
 
   /**
    * Return a const pointer to the element past the end of the underlying
    * storage.
+   *
+   * @deprecated This function suggests that the elements of a Tensor
+   *   object are stored as a contiguous array, but this is not in fact true
+   *   and one should not pretend that this so. As a consequence, this function
+   *   is deprecated.
    */
+  DEAL_II_DEPRECATED_EARLY
   const Number *
   end_raw() const;
 

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.