Skip to content

Commit f5dbc23

Browse files
committed
Do not use numberParallelSlices()
1 parent 59d3f4c commit f5dbc23

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

include/bout/field3d.hxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,8 @@ std::ostream& operator<<(std::ostream& out, const Field3D& value);
730730
inline Field3D copy(const Field3D& f) {
731731
Field3D result{f};
732732
result.allocate();
733-
for (size_t i = 0; i < result.numberParallelSlices(); ++i) {
733+
const size_t numSlices = result.hasParallelSlices() ? result.fieldmesh->ystart : 0;
734+
for (size_t i = 0; i < numSlices; ++i) {
734735
result.yup(i).allocate();
735736
result.ydown(i).allocate();
736737
}

0 commit comments

Comments
 (0)