From 6f67ca2b0af2034791ac2176f733358d891d2019 Mon Sep 17 00:00:00 2001 From: tomc271 Date: Mon, 6 Nov 2023 14:37:34 +0000 Subject: [PATCH] YAGNI: Remove MetricType(). --- include/bout/bout_types.hxx | 4 ---- include/bout/metricTensor.hxx | 2 -- src/mesh/contravariantMetricTensor.cxx | 2 -- src/mesh/covariantMetricTensor.cxx | 2 -- 4 files changed, 10 deletions(-) diff --git a/include/bout/bout_types.hxx b/include/bout/bout_types.hxx index 9926434ad2..5a00b5144b 100644 --- a/include/bout/bout_types.hxx +++ b/include/bout/bout_types.hxx @@ -46,10 +46,6 @@ constexpr CELL_LOC CELL_YLOW = CELL_LOC::ylow; constexpr CELL_LOC CELL_ZLOW = CELL_LOC::zlow; constexpr CELL_LOC CELL_VSHIFT = CELL_LOC::vshift; -enum class METRIC_TYPE { contravariant, covariant }; -constexpr METRIC_TYPE TYPE_CONTRAVARIANT = METRIC_TYPE::contravariant; -constexpr METRIC_TYPE TYPE_COVARIANT = METRIC_TYPE::covariant; - std::string toString(CELL_LOC location); CELL_LOC CELL_LOCFromString(const std::string& location_string); diff --git a/include/bout/metricTensor.hxx b/include/bout/metricTensor.hxx index aaeecf0b81..96e3bda7e0 100644 --- a/include/bout/metricTensor.hxx +++ b/include/bout/metricTensor.hxx @@ -40,8 +40,6 @@ public: void setLocation(const CELL_LOC location); -// [[maybe_unused]] virtual METRIC_TYPE MetricType() = 0; - protected: FieldMetric g11, g22, g33, g12, g13, g23; }; diff --git a/src/mesh/contravariantMetricTensor.cxx b/src/mesh/contravariantMetricTensor.cxx index 91ce7ec421..1481151e66 100644 --- a/src/mesh/contravariantMetricTensor.cxx +++ b/src/mesh/contravariantMetricTensor.cxx @@ -13,8 +13,6 @@ ContravariantMetricTensor::ContravariantMetricTensor( const BoutReal g13, const BoutReal g23, Mesh* mesh) : MetricTensor::MetricTensor(g11, g22, g33, g12, g13, g23, mesh) {} -//[[maybe_unused]] METRIC_TYPE MetricType() { return TYPE_CONTRAVARIANT; } - void ContravariantMetricTensor::calcContravariant( CovariantMetricTensor covariantMetricTensor, CELL_LOC location, const std::string& region) { diff --git a/src/mesh/covariantMetricTensor.cxx b/src/mesh/covariantMetricTensor.cxx index d0a7e28959..4064af07df 100644 --- a/src/mesh/covariantMetricTensor.cxx +++ b/src/mesh/covariantMetricTensor.cxx @@ -15,8 +15,6 @@ CovariantMetricTensor::CovariantMetricTensor(const BoutReal g_11, const BoutReal Mesh* mesh) : MetricTensor::MetricTensor(g_11, g_22, g_33, g_12, g_13, g_23, mesh) {} -//[[maybe_unused]] METRIC_TYPE MetricType() { return TYPE_CONTRAVARIANT; } - void CovariantMetricTensor::calcCovariant( ContravariantMetricTensor contravariantMetricTensor, const CELL_LOC location, const std::string& region) {