Aquiferxxx: some modernization

- typedef -> using
- use constexpr
This commit is contained in:
Arne Morten Kvarving 2022-08-10 14:27:34 +02:00
parent e73d3368e0
commit 66b4f1edb7
4 changed files with 18 additions and 16 deletions

View File

@ -37,7 +37,7 @@ template <typename TypeTag>
class AquiferCarterTracy : public AquiferInterface<TypeTag>
{
public:
typedef AquiferInterface<TypeTag> Base;
using Base = AquiferInterface<TypeTag>;
using typename Base::BlackoilIndices;
using typename Base::ElementContext;
@ -236,6 +236,7 @@ protected:
return this->aquct_data_.datum_depth;
}
}; // class AquiferCarterTracy
} // namespace Opm
#endif

View File

@ -37,7 +37,7 @@ class AquiferFetkovich : public AquiferInterface<TypeTag>
{
public:
typedef AquiferInterface<TypeTag> Base;
using Base = AquiferInterface<TypeTag>;
using typename Base::BlackoilIndices;
using typename Base::ElementContext;
@ -171,5 +171,7 @@ protected:
return this->aqufetp_data_.datum_depth;
}
}; // Class AquiferFetkovich
} // namespace Opm
#endif

View File

@ -62,21 +62,20 @@ public:
enum { enableEvaporation = getPropValue<TypeTag, Properties::EnableEvaporation>() };
enum { enableSaltPrecipitation = getPropValue<TypeTag, Properties::EnableSaltPrecipitation>() };
static const int numEq = BlackoilIndices::numEq;
typedef double Scalar;
static constexpr int numEq = BlackoilIndices::numEq;
using Scalar = double;
typedef DenseAd::Evaluation<double, /*size=*/numEq> Eval;
using Eval = DenseAd::Evaluation<double, /*size=*/numEq>;
typedef BlackOilFluidState<Eval,
FluidSystem,
enableTemperature,
enableEnergy,
BlackoilIndices::gasEnabled,
enableEvaporation,
enableBrine,
enableSaltPrecipitation,
BlackoilIndices::numPhases>
FluidState;
using FluidState = BlackOilFluidState<Eval,
FluidSystem,
enableTemperature,
enableEnergy,
BlackoilIndices::gasEnabled,
enableEvaporation,
enableBrine,
enableSaltPrecipitation,
BlackoilIndices::numPhases>;
// Constructor
AquiferInterface(int aqID,

View File

@ -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<double, numEq>;
using Toolbox = MathToolbox<Eval>;