fluid states: remove phaseIsPresent()
this method is now unused and before, it only caused trouble. To replicate it, use fluidState.saturation(phaseIdx) > 0.0.
This commit is contained in:
parent
a15cb08d2e
commit
45870255f7
@ -179,13 +179,6 @@ public:
|
||||
return this->base().saturation(phaseIdx);
|
||||
}
|
||||
|
||||
auto phaseIsPresent(unsigned phaseIdx) const
|
||||
-> decltype(this->base().phaseIsPresent(phaseIdx))
|
||||
{
|
||||
assert(false);
|
||||
return this->base().phaseIsPresent(phaseIdx);
|
||||
}
|
||||
|
||||
auto fugacity(unsigned phaseIdx, unsigned compIdx) const
|
||||
-> decltype(this->base().fugacity(phaseIdx, compIdx))
|
||||
{
|
||||
@ -261,7 +254,6 @@ void checkFluidState(const BaseFluidState& fs)
|
||||
val = fs.molarVolume(/*phaseIdx=*/0);
|
||||
val = fs.density(/*phaseIdx=*/0);
|
||||
val = fs.saturation(/*phaseIdx=*/0);
|
||||
bool b OPM_UNUSED = fs.phaseIsPresent(/*phaseIdx=*/0);
|
||||
val = fs.fugacity(/*phaseIdx=*/0, /*compIdx=*/0);
|
||||
val = fs.fugacityCoefficient(/*phaseIdx=*/0, /*compIdx=*/0);
|
||||
val = fs.enthalpy(/*phaseIdx=*/0);
|
||||
|
@ -132,9 +132,6 @@ public:
|
||||
unsigned short pvtRegionIndex() const
|
||||
{ return pvtRegionIdx_; }
|
||||
|
||||
bool phaseIsPresent(unsigned phaseIdx) const
|
||||
{ return saturation_[phaseIdx] > 0.0; }
|
||||
|
||||
//////
|
||||
// slow methods
|
||||
//////
|
||||
|
@ -57,12 +57,6 @@ public:
|
||||
const Scalar& saturation(unsigned phaseIdx) const
|
||||
{ return saturation_[phaseIdx]; }
|
||||
|
||||
/*!
|
||||
* \brief Returns true iff a fluid phase shall be assumed to be present.
|
||||
*/
|
||||
bool phaseIsPresent(unsigned phaseIdx) const
|
||||
{ return saturation_[phaseIdx] > 0.0; }
|
||||
|
||||
/*!
|
||||
* \brief Set the saturation of a phase [-]
|
||||
*/
|
||||
@ -115,12 +109,6 @@ public:
|
||||
const Scalar& saturation(unsigned /* phaseIdx */) const
|
||||
{ OPM_THROW(std::runtime_error, "Saturation is not provided by this fluid state"); }
|
||||
|
||||
/*!
|
||||
* \brief Returns true iff a fluid phase shall be assumed to be present.
|
||||
*/
|
||||
bool phaseIsPresent(unsigned /* phaseIdx */) const
|
||||
{ OPM_THROW(std::runtime_error, "phaseIsPresent() is not provided by this fluid state"); }
|
||||
|
||||
/*!
|
||||
* \brief Retrieve all parameters from an arbitrary fluid
|
||||
* state.
|
||||
|
@ -88,12 +88,6 @@ public:
|
||||
-> decltype(std::declval<FluidState>().saturation(phaseIdx))
|
||||
{ return fs_->saturation(phaseIdx); }
|
||||
|
||||
/*!
|
||||
* \brief Returns true iff a fluid phase shall be assumed to be present.
|
||||
*/
|
||||
bool phaseIsPresent(unsigned phaseIdx) const
|
||||
{ return fs_->phaseIsPresent(phaseIdx); }
|
||||
|
||||
/*!
|
||||
* \brief The mole fraction of a component in a phase []
|
||||
*/
|
||||
|
@ -87,12 +87,6 @@ public:
|
||||
-> decltype(std::declval<FluidState>().saturation(phaseIdx))
|
||||
{ return saturation_[phaseIdx]; }
|
||||
|
||||
/*!
|
||||
* \brief Returns true iff a fluid phase shall be assumed to be present.
|
||||
*/
|
||||
bool phaseIsPresent(unsigned phaseIdx) const
|
||||
{ return saturation_[phaseIdx] > 0.0; }
|
||||
|
||||
/*!
|
||||
* \brief The mole fraction of a component in a phase []
|
||||
*/
|
||||
|
@ -90,12 +90,6 @@ public:
|
||||
-> decltype(std::declval<FluidState>().saturation(phaseIdx))
|
||||
{ return fs_->saturation(phaseIdx); }
|
||||
|
||||
/*!
|
||||
* \brief Returns true iff a fluid phase shall be assumed to be present.
|
||||
*/
|
||||
bool phaseIsPresent(unsigned phaseIdx) const
|
||||
{ return fs_->phaseIsPresent(phaseIdx); }
|
||||
|
||||
/*!
|
||||
* \brief The mole fraction of a component in a phase []
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user