From 730a7c8fb24f91255f55e2341ae893b7b7a394ee Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Thu, 17 Sep 2015 00:02:48 -0500 Subject: [PATCH] Tensor: Remove obsolete exception --- include/deal.II/base/tensor.h | 9 ------- include/deal.II/base/tensor_deprecated.h | 34 +++++++++++++----------- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index bb5e1edf28..fe219184cb 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -552,15 +552,6 @@ public: template void serialize(Archive &ar, const unsigned int version); - /** - * Exception. - */ - DeclException1 (ExcInvalidTensorContractionIndex, - int, - << "You have requested contraction of tensors over index " - << arg1 - << ", but this is not possible for tensors of the current type."); - /** * Internal type declaration that is used to specialize the return type * of operator[]() for Tensor<1,dim,Number> diff --git a/include/deal.II/base/tensor_deprecated.h b/include/deal.II/base/tensor_deprecated.h index 6fdd0d897d..646fe76d48 100644 --- a/include/deal.II/base/tensor_deprecated.h +++ b/include/deal.II/base/tensor_deprecated.h @@ -28,6 +28,17 @@ DEAL_II_NAMESPACE_OPEN */ //@{ +/** + * Exception. + * + * @deprecated + */ +DeclException1 (ExcInvalidTensorContractionIndex, + int, + << "You have requested contraction of tensors over index " + << arg1 + << ", but this is not possible for tensors of the current type."); + /** * Double contract two tensors of rank 2, thus computing the Frobenius inner @@ -260,8 +271,7 @@ void contract (Tensor<2,dim,Number> &dest, break; default: - Assert (false, - (typename Tensor<2,dim,Number>::ExcInvalidTensorContractionIndex (index2))); + Assert (false, (ExcInvalidTensorContractionIndex (index2))); }; break; case 2: @@ -281,13 +291,12 @@ void contract (Tensor<2,dim,Number> &dest, break; default: - Assert (false, - (typename Tensor<2,dim,Number>::ExcInvalidTensorContractionIndex (index2))); + Assert (false, (ExcInvalidTensorContractionIndex (index2))); }; break; default: - Assert (false, (typename Tensor<2,dim,Number>::ExcInvalidTensorContractionIndex (index1))); + Assert (false, (ExcInvalidTensorContractionIndex (index1))); }; } @@ -323,8 +332,7 @@ void contract (Tensor<2,dim,Number> &dest, break; default: - Assert (false, - (typename Tensor<2,dim,Number>::ExcInvalidTensorContractionIndex (index1))); + Assert (false, (ExcInvalidTensorContractionIndex (index1))); }; } @@ -356,8 +364,7 @@ void contract (Tensor<3,dim,Number> &dest, dest[i][j][k] += src1[l][i][j] * src2[k][l]; break; default: - Assert (false, - (typename Tensor<2,dim,Number>::ExcInvalidTensorContractionIndex (index2))); + Assert (false, (ExcInvalidTensorContractionIndex (index2))); } break; @@ -379,8 +386,7 @@ void contract (Tensor<3,dim,Number> &dest, dest[i][j][k] += src1[i][l][j] * src2[k][l]; break; default: - Assert (false, - (typename Tensor<2,dim,Number>::ExcInvalidTensorContractionIndex (index2))); + Assert (false, (ExcInvalidTensorContractionIndex (index2))); } break; @@ -402,14 +408,12 @@ void contract (Tensor<3,dim,Number> &dest, dest[i][j][k] += src1[i][j][l] * src2[k][l]; break; default: - Assert (false, - (typename Tensor<2,dim,Number>::ExcInvalidTensorContractionIndex (index2))); + Assert (false, (ExcInvalidTensorContractionIndex (index2))); } break; default: - Assert (false, - (typename Tensor<3,dim,Number>::ExcInvalidTensorContractionIndex (index1))); + Assert (false, (ExcInvalidTensorContractionIndex (index1))); } } -- 2.39.5