Skip to content

Commit a4fe574

Browse files
committed
Ensure metric terms are always communicated
1 parent 0663ea8 commit a4fe574

5 files changed

Lines changed: 1 addition & 19 deletions

File tree

include/bout/coordinates.hxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,6 @@ public:
255255
IntShiftTorsion_ = std::move(IntShiftTorsion);
256256
}
257257

258-
int communicateAndCheckMeshSpacing();
259-
260258
///////////////////////////////////////////////////////////
261259
// Parallel transforms
262260
///////////////////////////////////////////////////////////

include/bout/metric_tensor.hxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ public:
7474
g23_m = function(g23_m);
7575
}
7676

77-
void communicate(Mesh* mesh);
78-
7977
private:
8078
FieldMetric g11_m, g22_m, g33_m, g12_m, g13_m, g23_m;
8179
};

src/mesh/christoffel_symbols.cxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ ChristoffelSymbols::ChristoffelSymbols(Coordinates& coordinates) {
88
// Note: This calculation is completely general: metric
99
// tensor can be 2D or 3D. For 2D, all DDZ terms are zero
1010

11-
coordinates.communicateAndCheckMeshSpacing();
12-
1311
const auto& contravariantMetricTensor = coordinates.getContravariantMetricTensor();
1412
const auto& covariantMetricTensor = coordinates.getCovariantMetricTensor();
1513

src/mesh/coordinates.cxx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -789,15 +789,6 @@ void Coordinates::setDz(FieldMetric dz) {
789789
localmesh->communicate(dz_);
790790
}
791791

792-
int Coordinates::communicateAndCheckMeshSpacing() {
793-
TRACE("Coordinates::communicateAndCheckMeshSpacing");
794-
795-
covariantMetricTensor.communicate(localmesh);
796-
contravariantMetricTensor.communicate(localmesh);
797-
798-
return 0;
799-
}
800-
801792
void Coordinates::recalculateAndReset(bool recalculate_staggered,
802793
bool force_interpolate_from_centre) {
803794

src/mesh/metric_tensor.cxx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,6 @@ MetricTensor MetricTensor::inverse(const std::string& region) {
125125
output_info.write("\tMaximum error in off-diagonal inversion is {:e}\n",
126126
off_diagonal_maxerr);
127127

128+
g_11.getMesh()->communicate(g_11, g_22, g_33, g_12, g_13, g_23);
128129
return MetricTensor(g_11, g_22, g_33, g_12, g_13, g_23);
129130
}
130-
131-
void MetricTensor::communicate(Mesh* mesh) {
132-
mesh->communicate(g11_m, g22_m, g33_m, g12_m, g13_m, g23_m);
133-
}

0 commit comments

Comments
 (0)