Skip to content

Commit 3b0c3c3

Browse files
committed
bug fix
1 parent 870304d commit 3b0c3c3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

kratos/utilities/data_type_traits.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,7 @@ template<class TDataType> class DataTypeTraits<DenseMatrix<TDataType>>
14701470
const auto stride = ValueTraits::Size(pShapeBegin + 2, pShapeEnd);
14711471
for (unsigned int i = 0; i < *pShapeBegin; ++i) {
14721472
for (unsigned int j = 0; j < *(pShapeBegin + 1); ++j) {
1473-
ValueTraits::template CopyToContiguousData<TIteratorType>(pContiguousDataBegin + i * stride * (*pShapeBegin) + j * stride, rContainer(i, j), pShapeBegin + 2, pShapeEnd);
1473+
ValueTraits::template CopyToContiguousData<TIteratorType>(pContiguousDataBegin + i * stride * (*(pShapeBegin + 1)) + j * stride, rContainer(i, j), pShapeBegin + 2, pShapeEnd);
14741474
}
14751475
}
14761476
} else {
@@ -1532,7 +1532,7 @@ template<class TDataType> class DataTypeTraits<DenseMatrix<TDataType>>
15321532
const auto stride = ValueTraits::Size(pShapeBegin + 2, pShapeEnd);
15331533
for (unsigned int i = 0; i < *pShapeBegin; ++i) {
15341534
for (unsigned int j = 0; j < *(pShapeBegin + 1); ++j) {
1535-
ValueTraits::template CopyFromContiguousData<TIteratorType>(rContainer(i, j), pContiguousDataBegin + i * stride * (*pShapeBegin) + j * stride, pShapeBegin + 2, pShapeEnd);
1535+
ValueTraits::template CopyFromContiguousData<TIteratorType>(rContainer(i, j), pContiguousDataBegin + i * stride * (*(pShapeBegin + 1)) + j * stride, pShapeBegin + 2, pShapeEnd);
15361536
}
15371537
}
15381538
} else {

0 commit comments

Comments
 (0)