EclNewtonMethod: some modernization

- typedef -> using
- use constexpr
This commit is contained in:
Arne Morten Kvarving 2022-08-10 12:34:03 +02:00
parent beaf8c20f4
commit c626dc7488

View File

@ -65,7 +65,7 @@ namespace Opm {
template <class TypeTag> template <class TypeTag>
class EclNewtonMethod : public BlackOilNewtonMethod<TypeTag> class EclNewtonMethod : public BlackOilNewtonMethod<TypeTag>
{ {
typedef BlackOilNewtonMethod<TypeTag> ParentType; using ParentType = BlackOilNewtonMethod<TypeTag>;
using DiscNewtonMethod = GetPropType<TypeTag, Properties::DiscNewtonMethod>; using DiscNewtonMethod = GetPropType<TypeTag, Properties::DiscNewtonMethod>;
using Simulator = GetPropType<TypeTag, Properties::Simulator>; using Simulator = GetPropType<TypeTag, Properties::Simulator>;
@ -79,7 +79,7 @@ class EclNewtonMethod : public BlackOilNewtonMethod<TypeTag>
using Linearizer = GetPropType<TypeTag, Properties::Linearizer>; using Linearizer = GetPropType<TypeTag, Properties::Linearizer>;
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>; using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
static const unsigned numEq = getPropValue<TypeTag, Properties::NumEq>(); static constexpr unsigned numEq = getPropValue<TypeTag, Properties::NumEq>();
static constexpr int contiSolventEqIdx = Indices::contiSolventEqIdx; static constexpr int contiSolventEqIdx = Indices::contiSolventEqIdx;
static constexpr int contiPolymerEqIdx = Indices::contiPolymerEqIdx; static constexpr int contiPolymerEqIdx = Indices::contiPolymerEqIdx;