27 #ifndef OPM_ECL_SOLID_ENERGY_LAW_MULTIPLEXER_PARAMS_HPP 28 #define OPM_ECL_SOLID_ENERGY_LAW_MULTIPLEXER_PARAMS_HPP 37 #include <type_traits> 41 enum class EclSolidEnergyApproach {
52 template <
class ScalarT>
55 using ParamPointerType =
void*;
58 using Scalar = ScalarT;
66 void setSolidEnergyApproach(EclSolidEnergyApproach newApproach)
70 solidEnergyApproach_ = newApproach;
71 switch (solidEnergyApproach()) {
72 case EclSolidEnergyApproach::Undefined:
73 throw std::logic_error(
"Cannot set the approach for solid energy storage to 'undefined'!");
75 case EclSolidEnergyApproach::Heatcr:
79 case EclSolidEnergyApproach::Specrock:
83 case EclSolidEnergyApproach::Null:
84 realParams_ =
nullptr;
89 EclSolidEnergyApproach solidEnergyApproach()
const 90 {
return solidEnergyApproach_; }
93 template <EclSol
idEnergyApproach approachV>
94 typename std::enable_if<approachV == EclSolidEnergyApproach::Heatcr, HeatcrLawParams>::type&
97 assert(solidEnergyApproach() == approachV);
101 template <EclSol
idEnergyApproach approachV>
102 typename std::enable_if<approachV == EclSolidEnergyApproach::Heatcr, const HeatcrLawParams>::type&
103 getRealParams()
const 105 assert(solidEnergyApproach() == approachV);
110 template <EclSol
idEnergyApproach approachV>
111 typename std::enable_if<approachV == EclSolidEnergyApproach::Specrock, SpecrockLawParams>::type&
114 assert(solidEnergyApproach() == approachV);
118 template <EclSol
idEnergyApproach approachV>
119 typename std::enable_if<approachV == EclSolidEnergyApproach::Specrock, const SpecrockLawParams>::type&
120 getRealParams()
const 122 assert(solidEnergyApproach() == approachV);
129 switch (solidEnergyApproach()) {
130 case EclSolidEnergyApproach::Undefined:
133 case EclSolidEnergyApproach::Heatcr:
137 case EclSolidEnergyApproach::Specrock:
141 case EclSolidEnergyApproach::Null:
145 solidEnergyApproach_ = EclSolidEnergyApproach::Undefined;
148 EclSolidEnergyApproach solidEnergyApproach_{EclSolidEnergyApproach::Undefined};
149 ParamPointerType realParams_{
nullptr};
The default implementation of a parameter object for the ECL thermal law.
Definition: EclSolidEnergyLawMultiplexerParams.hpp:53
The default implementation of a parameter object for the ECL thermal law.
Definition: EclHeatcrLawParams.hpp:39
The default implementation of a parameter object for the ECL thermal law based on SPECROCK...
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
The default implementation of a parameter object for the ECL thermal law.
Default implementation for asserting finalization of parameter objects.
The default implementation of a parameter object for the ECL thermal law based on SPECROCK...
Definition: EclSpecrockLawParams.hpp:42
Default implementation for asserting finalization of parameter objects.
Definition: EnsureFinalized.hpp:48