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:
75 realParams_ =
new ThconrLawParams;
78 case EclThermalConductionApproach::Thc:
79 realParams_ =
new ThcLawParams;
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);
97 return *
static_cast<ThconrLawParams*
>(realParams_);
100 template <EclThermalConductionApproach approachV>
101 typename std::enable_if<approachV == EclThermalConductionApproach::Thconr, const ThconrLawParams>::type&
102 getRealParams()
const
104 assert(thermalConductionApproach() == approachV);
105 return *
static_cast<const ThconrLawParams*
>(realParams_);
109 template <EclThermalConductionApproach approachV>
110 typename std::enable_if<approachV == EclThermalConductionApproach::Thc, ThcLawParams>::type&
113 assert(thermalConductionApproach() == approachV);
114 return *
static_cast<ThcLawParams*
>(realParams_);
117 template <EclThermalConductionApproach approachV>
118 typename std::enable_if<approachV == EclThermalConductionApproach::Thc, const ThcLawParams>::type&
119 getRealParams()
const
121 assert(thermalConductionApproach() == approachV);
122 return *
static_cast<const ThcLawParams*
>(realParams_);
128 switch (thermalConductionApproach()) {
129 case EclThermalConductionApproach::Undefined:
132 case EclThermalConductionApproach::Thconr:
133 delete static_cast<ThconrLawParams*
>(realParams_);
136 case EclThermalConductionApproach::Thc:
137 delete static_cast<ThcLawParams*
>(realParams_);
140 case EclThermalConductionApproach::Null:
144 thermalConductionApproach_ = EclThermalConductionApproach::Undefined;
147 EclThermalConductionApproach thermalConductionApproach_{EclThermalConductionApproach::Undefined};
148 ParamPointerType realParams_{
nullptr};
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30