]> https://gitweb.dealii.org/ - dealii.git/commit
Tensor<k, dim, Number::unroll(): fix copy statement 16519/head
authorMatthias Maier <tamiko@43-1.org>
Mon, 22 Jan 2024 20:14:25 +0000 (14:14 -0600)
committerMatthias Maier <tamiko@43-1.org>
Mon, 22 Jan 2024 20:16:31 +0000 (14:16 -0600)
commit0e6b7353993d82486d655958a8b6d3d5b068e854
tree1ad852fc4288864183e7594092cb7648dc58f8d6
parentcdd37c656170950f293999b9b601b097ec6db112
Tensor<k, dim, Number::unroll(): fix copy statement

The task for the rank-1 case is to copy all values from the internal
values array to the iterator range, so let us just use
```
  std::copy(std::begin(values), std::end(values), begin);
```
for this. The problem with the `&values[dim]` statement is the fact that
values[dim] is an out-of-bounds access and the address of if is
undefined.
include/deal.II/base/tensor.h

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.