From: Wolfgang Bangerth Date: Fri, 20 Aug 2021 20:54:41 +0000 (-0600) Subject: Deprecate ArrayView functionality for tensors. X-Git-Tag: v9.4.0-rc1~1027^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb313192bd12aacbc07975f3aa7d74676f4c5c94;p=dealii.git Deprecate ArrayView functionality for tensors. --- diff --git a/include/deal.II/base/array_view.h b/include/deal.II/base/array_view.h index af39436d06..f38a7d14ae 100644 --- a/include/deal.II/base/array_view.h +++ b/include/deal.II/base/array_view.h @@ -787,10 +787,15 @@ make_array_view(ArrayView &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 -inline ArrayView +DEAL_II_DEPRECATED_EARLY inline ArrayView make_array_view(const Tensor &tensor) { return make_array_view(tensor.begin_raw(), tensor.end_raw()); @@ -812,10 +817,15 @@ make_array_view(const Tensor &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 -inline ArrayView +DEAL_II_DEPRECATED_EARLY inline ArrayView make_array_view(Tensor &tensor) { return make_array_view(tensor.begin_raw(), tensor.end_raw()); @@ -837,10 +847,15 @@ make_array_view(Tensor &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 -inline ArrayView +DEAL_II_DEPRECATED_EARLY inline ArrayView make_array_view(const SymmetricTensor &tensor) { return make_array_view(tensor.begin_raw(), tensor.end_raw()); @@ -863,10 +878,15 @@ make_array_view(const SymmetricTensor &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 -inline ArrayView +DEAL_II_DEPRECATED_EARLY inline ArrayView make_array_view(SymmetricTensor &tensor) { return make_array_view(tensor.begin_raw(), tensor.end_raw()); diff --git a/include/deal.II/base/symmetric_tensor.h b/include/deal.II/base/symmetric_tensor.h index 60a61ed182..5e539e7370 100644 --- a/include/deal.II/base/symmetric_tensor.h +++ b/include/deal.II/base/symmetric_tensor.h @@ -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; diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index a6617dd6a9..d4fd088aa5 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -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;