Skip to content

Commit 77fb0c9

Browse files
committed
Add Coordinates::communicateDz() and call after constructing Coordinates
to prevent getUniform(coords->zlength()) failing because the field is not const.
1 parent 6c69d6a commit 77fb0c9

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

include/bout/coordinates.hxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ public:
237237

238238
void communicateMetricTensor();
239239

240+
void communicateDz();
241+
240242
///< Coordinate system Jacobian, so volume of cell is J*dx*dy*dz
241243
FieldMetric& J() const;
242244

include/bout/mesh.hxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,7 @@ public:
654654
force_interpolate_from_centre);
655655

656656
inserted.first->second->communicateMetricTensor();
657+
inserted.first->second->communicateDz();
657658

658659
return inserted.first->second;
659660
}

src/mesh/coordinates.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,4 +1540,8 @@ void Coordinates::setMetricTensor(
15401540
void Coordinates::communicateMetricTensor() {
15411541
contravariantMetricTensor.communicate();
15421542
covariantMetricTensor.communicate();
1543+
}
1544+
1545+
void Coordinates::communicateDz() {
1546+
localmesh->communicate(dz_);
15431547
}

0 commit comments

Comments
 (0)