25 #ifndef OPM_EFF_TO_ABS_LAW_PARAMS_HPP
26 #define OPM_EFF_TO_ABS_LAW_PARAMS_HPP
38 template <
class EffLawParamsT,
int numPhases>
41 typedef EffLawParamsT EffLawParams;
42 typedef typename EffLawParams::Traits::Scalar Scalar;
45 typedef typename EffLawParams::Traits
Traits;
51 for (
unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
52 residualSaturation_[phaseIdx] = 0.0;
65 sumResidualSaturations_ = 0.0;
66 for (
unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
67 sumResidualSaturations_ += residualSaturation_[phaseIdx];
69 EffLawParams::finalize();
80 { assertFinalized_();
return residualSaturation_[phaseIdx]; }
86 { assertFinalized_();
return sumResidualSaturations_; }
92 { residualSaturation_[phaseIdx] = value; }
96 void assertFinalized_()
const
97 { assert(finalized_); }
101 void assertFinalized_()
const
105 Scalar residualSaturation_[numPhases];
106 Scalar sumResidualSaturations_;
EffLawParams::Traits Traits
Definition: EffToAbsLawParams.hpp:45
A default implementation of the parameters for the adapter class to convert material laws from effect...
Definition: EffToAbsLawParams.hpp:39
Definition: Air_Mesitylene.hpp:31
Scalar residualSaturation(unsigned phaseIdx) const
Return the residual saturation of a phase.
Definition: EffToAbsLawParams.hpp:79
EffToAbsLawParams()
Definition: EffToAbsLawParams.hpp:48
void setResidualSaturation(unsigned phaseIdx, Scalar value)
Set the residual saturation of a phase.
Definition: EffToAbsLawParams.hpp:91
void finalize()
Calculate all dependent quantities once the independent quantities of the parameter object have been ...
Definition: EffToAbsLawParams.hpp:63
Scalar sumResidualSaturations() const
Return the sum of the residual saturations.
Definition: EffToAbsLawParams.hpp:85