EclSpecrockLaw(Params): some modernization

- typedef -> using
- fix includes
This commit is contained in:
Arne Morten Kvarving 2022-08-03 08:26:43 +02:00
parent 791aad07bd
commit e1db0bbb4c
2 changed files with 8 additions and 7 deletions

View File

@ -29,10 +29,9 @@
#include "EclSpecrockLawParams.hpp" #include "EclSpecrockLawParams.hpp"
#include <opm/material/densead/Math.hpp>
namespace Opm namespace Opm
{ {
/*! /*!
* \ingroup material * \ingroup material
* *
@ -45,8 +44,8 @@ template <class ScalarT,
class EclSpecrockLaw class EclSpecrockLaw
{ {
public: public:
typedef ParamsT Params; using Params = ParamsT;
typedef typename Params::Scalar Scalar; using Scalar = typename Params::Scalar;
/*! /*!
* \brief Given a fluid state, compute the volumetric internal energy of the rock [W/m^3]. * \brief Given a fluid state, compute the volumetric internal energy of the rock [W/m^3].
@ -58,6 +57,7 @@ public:
return params.internalEnergyFunction().eval(T, /*extrapolate=*/true); return params.internalEnergyFunction().eval(T, /*extrapolate=*/true);
} }
}; };
} // namespace Opm } // namespace Opm
#endif #endif

View File

@ -28,9 +28,10 @@
#define OPM_ECL_SPECROCK_LAW_PARAMS_HPP #define OPM_ECL_SPECROCK_LAW_PARAMS_HPP
#include <opm/material/common/EnsureFinalized.hpp> #include <opm/material/common/EnsureFinalized.hpp>
#include <opm/material/common/Tabulated1DFunction.hpp> #include <opm/material/common/Tabulated1DFunction.hpp>
#include <cassert>
namespace Opm { namespace Opm {
/*! /*!
@ -40,10 +41,10 @@ namespace Opm {
template <class ScalarT> template <class ScalarT>
class EclSpecrockLawParams : public EnsureFinalized class EclSpecrockLawParams : public EnsureFinalized
{ {
typedef Tabulated1DFunction<ScalarT> InternalEnergyFunction; using InternalEnergyFunction = Tabulated1DFunction<ScalarT>;
public: public:
typedef ScalarT Scalar; using Scalar = ScalarT;
EclSpecrockLawParams(const EclSpecrockLawParams&) = default; EclSpecrockLawParams(const EclSpecrockLawParams&) = default;