Skip to content

Commit 15cffda

Browse files
committed
Set coordinates on FakeMesh
otherwise when Coordinates setters call mesh->communicate() and that calls calcParallelSlices() and that calls getCoordinates() the coordinates field will be a null pointer.
1 parent 47cff9e commit 15cffda

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/unit/test_extras.hxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,7 @@ public:
440440
Field2D{1.0}, Field2D{1.0}, Field2D{1.0}, Field2D{1.0}, Field2D{0.0},
441441
Field2D{0.0}, Field2D{0.0}, Field2D{1.0}, Field2D{1.0}, Field2D{1.0},
442442
Field2D{0.0}, Field2D{0.0}, Field2D{0.0}, Field2D{0.0}, Field2D{0.0});
443+
static_cast<FakeMesh*>(bout::globals::mesh)->setCoordinates(test_coords);
443444

444445
// Set nonuniform corrections
445446
test_coords->setNon_uniform(true);
@@ -488,6 +489,7 @@ public:
488489
Field2D{0.0, mesh_staggered}, Field2D{0.0, mesh_staggered},
489490
Field2D{0.0, mesh_staggered}, Field2D{0.0, mesh_staggered},
490491
Field2D{0.0, mesh_staggered});
492+
static_cast<FakeMesh*>(mesh_staggered)->setCoordinates(test_coords_staggered);
491493

492494
// Set nonuniform corrections
493495
test_coords_staggered->setNon_uniform(true);

0 commit comments

Comments
 (0)