From 66b4f1edb7e1c563ba47a51a92306f13fd2a78a3 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Wed, 10 Aug 2022 14:27:34 +0200 Subject: [PATCH] Aquiferxxx: some modernization - typedef -> using - use constexpr --- .../aquifers/AquiferCarterTracy.hpp | 3 ++- opm/simulators/aquifers/AquiferFetkovich.hpp | 4 ++- opm/simulators/aquifers/AquiferInterface.hpp | 25 +++++++++---------- opm/simulators/aquifers/AquiferNumerical.hpp | 2 +- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/opm/simulators/aquifers/AquiferCarterTracy.hpp b/opm/simulators/aquifers/AquiferCarterTracy.hpp index 2a654507a..749597454 100644 --- a/opm/simulators/aquifers/AquiferCarterTracy.hpp +++ b/opm/simulators/aquifers/AquiferCarterTracy.hpp @@ -37,7 +37,7 @@ template class AquiferCarterTracy : public AquiferInterface { public: - typedef AquiferInterface Base; + using Base = AquiferInterface; using typename Base::BlackoilIndices; using typename Base::ElementContext; @@ -236,6 +236,7 @@ protected: return this->aquct_data_.datum_depth; } }; // class AquiferCarterTracy + } // namespace Opm #endif diff --git a/opm/simulators/aquifers/AquiferFetkovich.hpp b/opm/simulators/aquifers/AquiferFetkovich.hpp index 0fad5501c..4f23af343 100644 --- a/opm/simulators/aquifers/AquiferFetkovich.hpp +++ b/opm/simulators/aquifers/AquiferFetkovich.hpp @@ -37,7 +37,7 @@ class AquiferFetkovich : public AquiferInterface { public: - typedef AquiferInterface Base; + using Base = AquiferInterface; using typename Base::BlackoilIndices; using typename Base::ElementContext; @@ -171,5 +171,7 @@ protected: return this->aqufetp_data_.datum_depth; } }; // Class AquiferFetkovich + } // namespace Opm + #endif diff --git a/opm/simulators/aquifers/AquiferInterface.hpp b/opm/simulators/aquifers/AquiferInterface.hpp index 74180a2d9..815b1eb89 100644 --- a/opm/simulators/aquifers/AquiferInterface.hpp +++ b/opm/simulators/aquifers/AquiferInterface.hpp @@ -62,21 +62,20 @@ public: enum { enableEvaporation = getPropValue() }; enum { enableSaltPrecipitation = getPropValue() }; - static const int numEq = BlackoilIndices::numEq; - typedef double Scalar; + static constexpr int numEq = BlackoilIndices::numEq; + using Scalar = double; - typedef DenseAd::Evaluation Eval; + using Eval = DenseAd::Evaluation; - typedef BlackOilFluidState - FluidState; + using FluidState = BlackOilFluidState; // Constructor AquiferInterface(int aqID, diff --git a/opm/simulators/aquifers/AquiferNumerical.hpp b/opm/simulators/aquifers/AquiferNumerical.hpp index f06ffe75c..37d23a744 100644 --- a/opm/simulators/aquifers/AquiferNumerical.hpp +++ b/opm/simulators/aquifers/AquiferNumerical.hpp @@ -50,7 +50,7 @@ public: enum { dimWorld = GridView::dimensionworld }; enum { numPhases = FluidSystem::numPhases }; - static const int numEq = BlackoilIndices::numEq; + static constexpr int numEq = BlackoilIndices::numEq; using Eval = DenseAd::Evaluation; using Toolbox = MathToolbox;