Skip to content

Commit

Permalink
YAGNI: Remove MetricType().
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchapman committed Nov 6, 2023
1 parent 668dc17 commit 6f67ca2
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 10 deletions.
4 changes: 0 additions & 4 deletions include/bout/bout_types.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 0 additions & 2 deletions include/bout/metricTensor.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
2 changes: 0 additions & 2 deletions src/mesh/contravariantMetricTensor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 0 additions & 2 deletions src/mesh/covariantMetricTensor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6f67ca2

Please sign in to comment.