EclThwLaw(Params): some modernization

- typedef -> using
- use constexpr where appropriate
- fix includes
This commit is contained in:
Arne Morten Kvarving 2022-08-03 08:26:43 +02:00
parent e1db0bbb4c
commit 31c7641fac
2 changed files with 7 additions and 7 deletions

View File

@ -29,10 +29,9 @@
#include "EclThcLawParams.hpp"
#include <opm/material/densead/Math.hpp>
namespace Opm
{
/*!
* \ingroup material
*
@ -42,12 +41,12 @@ namespace Opm
* keywords.
*/
template <class ScalarT,
class ParamsT = EclThcLawParams<ScalarT> >
class ParamsT = EclThcLawParams<ScalarT>>
class EclThcLaw
{
public:
typedef ParamsT Params;
typedef typename Params::Scalar Scalar;
using Params = ParamsT;
using Scalar = typename Params::Scalar;
/*!
* \brief Given a fluid state, return the total thermal conductivity [W/m^2 / (K/m)] of the porous
@ -68,7 +67,7 @@ public:
// incorrectness.
//
// TODO: also follow their fine leadership in the twophase case.
Scalar numPhases = 3.0;
constexpr const Scalar numPhases = 3.0;
Scalar thconAvg =
poro*(params.thcoil() + params.thcgas() + params.thcwater()) / numPhases
+ (1.0 - poro)*params.thcrock();
@ -76,6 +75,7 @@ public:
return thconAvg;
}
};
} // namespace Opm
#endif

View File

@ -39,7 +39,7 @@ template <class ScalarT>
class EclThcLawParams : public EnsureFinalized
{
public:
typedef ScalarT Scalar;
using Scalar = ScalarT;
EclThcLawParams(const EclThcLawParams&) = default;