Skip to content

Commit 038c0f9

Browse files
committed
Fixup compilation
1 parent 9776523 commit 038c0f9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/mesh/coordinates.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2088,6 +2088,7 @@ void Coordinates::_compute_cell_area_x() const {
20882088
_cell_area_xhigh.emplace(emptyFrom(area_centre));
20892089
// We cannot setLocation, as that would trigger the computation of staggered
20902090
// metrics.
2091+
auto mesh = Bxy.getMesh();
20912092
ASSERT0(mesh->xstart > 0);
20922093
BOUT_FOR(i, _jxz_centre->getRegion("RGN_NOX")) {
20932094
(*_cell_area_xlow)[i] = 0.5 * (area_centre[i] + area_centre[i.xm()]);
@@ -2102,15 +2103,16 @@ void Coordinates::_compute_cell_area_y() const {
21022103
ASSERT2(isUniform(dx, false, "RGN_ALL"));
21032104
ASSERT4(isUniform(dz, true, "RGN_ALL"));
21042105
ASSERT2(isUniform(dz, false, "RGN_ALL"));
2105-
_cell_area_ylow = _jxz_ylow * dx * dz;
2106-
_cell_area_yhigh = _jxz_yhigh * dx * dz;
2106+
_cell_area_ylow.emplace(*_jxz_ylow * dx * dz);
2107+
_cell_area_yhigh.emplace(*_jxz_yhigh * dx * dz);
21072108
} else {
21082109
// Field aligned
21092110
const auto area_centre = sqrt(g_11 * g_33 - SQ(g_13)) * dx * dz;
21102111
_cell_area_ylow.emplace(emptyFrom(area_centre));
21112112
_cell_area_yhigh.emplace(emptyFrom(area_centre));
21122113
// We cannot setLocation, as that would trigger the computation of staggered
21132114
// metrics.
2115+
auto mesh = Bxy.getMesh();
21142116
ASSERT0(mesh->ystart > 0);
21152117
BOUT_FOR(i, _jxz_centre->getRegion("RGN_NOY")) {
21162118
(*_cell_area_ylow)[i] = 0.5 * (area_centre[i] + area_centre[i.ym()]);

0 commit comments

Comments
 (0)