]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix tensor conversion
authorRene Gassmoeller <rene.gassmoeller@mailbox.org>
Mon, 4 Nov 2024 09:51:53 +0000 (10:51 +0100)
committerRene Gassmoeller <rene.gassmoeller@mailbox.org>
Mon, 4 Nov 2024 09:51:53 +0000 (10:51 +0100)
include/deal.II/base/tensor.h

index b7f2c0e5306213f078b81ee7d2209a659a437d7a..f3888740cef6bed00040da8eeaa15013f08b3e34 100644 (file)
@@ -1426,7 +1426,7 @@ constexpr DEAL_II_ALWAYS_INLINE Tensor<rank_, dim, Number>::
 operator Tensor<1, dim, Tensor<rank_ - 1, dim, OtherNumber>>() const
 {
   Tensor<1, dim, Tensor<rank_ - 1, dim, OtherNumber>> x;
-  std::copy(values.begin(), values.end(), x.values.begin());
+  std::copy(values.data(), values.data() + values.size(), x.values.data());
   return x;
 }
 

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.