]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Improve error message in SymmetricTensor constructor. 9980/head
authorSimon Sticko <simon@sticko.se>
Tue, 28 Apr 2020 15:05:19 +0000 (17:05 +0200)
committerSimon Sticko <simon@sticko.se>
Tue, 28 Apr 2020 15:05:19 +0000 (17:05 +0200)
include/deal.II/base/symmetric_tensor.h

index 073c004f57c480c300850b052903087ae74cfd6b..6fb2799a5428341d5b739b43d7f1154fd2c328ef 100644 (file)
@@ -1068,7 +1068,8 @@ SymmetricTensor<rank_, dim, Number>::SymmetricTensor(
   static_assert(rank == 2, "This function is only implemented for rank==2");
   for (unsigned int d = 0; d < dim; ++d)
     for (unsigned int e = 0; e < d; ++e)
-      Assert(t[d][e] == t[e][d], ExcInternalError());
+      Assert(t[d][e] == t[e][d],
+             ExcMessage("The incoming Tensor must be exactly symmetric."));
 
   for (unsigned int d = 0; d < dim; ++d)
     data[d] = t[d][d];

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.