27 #ifndef OPM_ECL_SOLID_ENERGY_LAW_MULTIPLEXER_PARAMS_HPP
28 #define OPM_ECL_SOLID_ENERGY_LAW_MULTIPLEXER_PARAMS_HPP
37 #include <type_traits>
45 template <
class ScalarT>
48 using ParamPointerType =
void*;
51 using Scalar = ScalarT;
53 enum SolidEnergyApproach {
66 { solidEnergyApproach_ = undefinedApproach; }
71 void setSolidEnergyApproach(SolidEnergyApproach newApproach)
75 solidEnergyApproach_ = newApproach;
76 switch (solidEnergyApproach()) {
77 case undefinedApproach:
78 throw std::logic_error(
"Cannot set the approach for solid energy storage to 'undefined'!");
84 case specrockApproach:
89 realParams_ =
nullptr;
94 SolidEnergyApproach solidEnergyApproach()
const
95 {
return solidEnergyApproach_; }
98 template <Sol
idEnergyApproach approachV>
99 typename std::enable_if<approachV == heatcrApproach, HeatcrLawParams>::type&
102 assert(solidEnergyApproach() == approachV);
106 template <Sol
idEnergyApproach approachV>
107 typename std::enable_if<approachV == heatcrApproach, const HeatcrLawParams>::type&
108 getRealParams()
const
110 assert(solidEnergyApproach() == approachV);
115 template <Sol
idEnergyApproach approachV>
116 typename std::enable_if<approachV == specrockApproach, SpecrockLawParams>::type&
119 assert(solidEnergyApproach() == approachV);
123 template <Sol
idEnergyApproach approachV>
124 typename std::enable_if<approachV == specrockApproach, const SpecrockLawParams>::type&
125 getRealParams()
const
127 assert(solidEnergyApproach() == approachV);
134 switch (solidEnergyApproach()) {
135 case undefinedApproach:
142 case specrockApproach:
150 solidEnergyApproach_ = undefinedApproach;
153 SolidEnergyApproach solidEnergyApproach_;
154 ParamPointerType realParams_;
The default implementation of a parameter object for the ECL thermal law.
The default implementation of a parameter object for the ECL thermal law based on SPECROCK.
Default implementation for asserting finalization of parameter objects.
The default implementation of a parameter object for the ECL thermal law.
Definition: EclHeatcrLawParams.hpp:40
The default implementation of a parameter object for the ECL thermal law.
Definition: EclSolidEnergyLawMultiplexerParams.hpp:47
The default implementation of a parameter object for the ECL thermal law based on SPECROCK.
Definition: EclSpecrockLawParams.hpp:43
Default implementation for asserting finalization of parameter objects.
Definition: EnsureFinalized.hpp:47