Skip to content

Commit e97bb62

Browse files
authored
Merge pull request #3319 from boutproject/no-compute-ynext
Prevent accidential overwriting of parallel slices
2 parents 899b937 + e220c66 commit e97bb62

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/field/field3d.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ Field3D& Field3D::operator=(const BoutReal val) {
343343
}
344344

345345
void Field3D::calcParallelSlices() {
346+
ASSERT1(areCalcParallelSlicesAllowed());
346347
getCoordinates()->getParallelTransform().calcParallelSlices(*this);
347348
}
348349

src/mesh/parallel/fci.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ void FCITransform::checkInputGrid() {
378378
}
379379

380380
void FCITransform::calcParallelSlices(Field3D& f) {
381-
381+
ASSERT1(f.areCalcParallelSlicesAllowed());
382382
ASSERT1(f.getDirectionY() == YDirectionType::Standard);
383383
// Only have forward_map/backward_map for CELL_CENTRE, so can only deal with
384384
// CELL_CENTRE inputs

0 commit comments

Comments
 (0)