27 #ifndef OPM_ECL_THERMAL_CONDUCTION_LAW_MULTIPLEXER_PARAMS_HPP 28 #define OPM_ECL_THERMAL_CONDUCTION_LAW_MULTIPLEXER_PARAMS_HPP 40 enum class EclThermalConductionApproach {
51 template <
class ScalarT>
54 using ParamPointerType =
void*;
57 using Scalar = ScalarT;
65 void setThermalConductionApproach(EclThermalConductionApproach newApproach)
69 thermalConductionApproach_ = newApproach;
70 switch (thermalConductionApproach()) {
71 case EclThermalConductionApproach::Undefined:
72 throw std::logic_error(
"Cannot set the approach for thermal conduction to 'undefined'!");
74 case EclThermalConductionApproach::Thconr:
78 case EclThermalConductionApproach::Thc:
82 case EclThermalConductionApproach::Null:
83 realParams_ =
nullptr;
88 EclThermalConductionApproach thermalConductionApproach()
const 89 {
return thermalConductionApproach_; }
92 template <EclThermalConductionApproach approachV>
93 typename std::enable_if<approachV == EclThermalConductionApproach::Thconr, ThconrLawParams>::type&
96 assert(thermalConductionApproach() == approachV);
100 template <EclThermalConductionApproach approachV>
101 typename std::enable_if<approachV == EclThermalConductionApproach::Thconr, const ThconrLawParams>::type&
102 getRealParams()
const 104 assert(thermalConductionApproach() == approachV);
109 template <EclThermalConductionApproach approachV>
110 typename std::enable_if<approachV == EclThermalConductionApproach::Thc, ThcLawParams>::type&
113 assert(thermalConductionApproach() == approachV);
117 template <EclThermalConductionApproach approachV>
118 typename std::enable_if<approachV == EclThermalConductionApproach::Thc, const ThcLawParams>::type&
119 getRealParams()
const 121 assert(thermalConductionApproach() == approachV);
128 switch (thermalConductionApproach()) {
129 case EclThermalConductionApproach::Undefined:
132 case EclThermalConductionApproach::Thconr:
136 case EclThermalConductionApproach::Thc:
140 case EclThermalConductionApproach::Null:
144 thermalConductionApproach_ = EclThermalConductionApproach::Undefined;
147 EclThermalConductionApproach thermalConductionApproach_{EclThermalConductionApproach::Undefined};
148 ParamPointerType realParams_{
nullptr};
The default implementation of a parameter object for the ECL thermal law.
Definition: EclThermalConductionLawMultiplexerParams.hpp:52
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Default implementation for asserting finalization of parameter objects.
The default implementation of a parameter object for the thermal conduction law based on the THCONR k...
The default implementation of a parameter object for the thermal conduction law based on the THC* key...
The default implementation of a parameter object for the thermal conduction law based on the THC* key...
Definition: EclThcLawParams.hpp:39
Default implementation for asserting finalization of parameter objects.
Definition: EnsureFinalized.hpp:48
The default implementation of a parameter object for the thermal conduction law based on the THCONR k...
Definition: EclThconrLawParams.hpp:39