Skip to content

Commit

Permalink
LiveOilPvt: some simplifications
Browse files Browse the repository at this point in the history
drop unused constructors and explicit comparison operator
  • Loading branch information
akva2 committed Dec 22, 2022
1 parent 622abe6 commit 219536d
Showing 1 changed file with 4 additions and 46 deletions.
50 changes: 4 additions & 46 deletions opm/material/fluidsystems/blackoilpvt/LiveOilPvt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,35 +55,6 @@ class LiveOilPvt
using TabulatedTwoDFunction = UniformXTabulated2DFunction<Scalar>;
using TabulatedOneDFunction = Tabulated1DFunction<Scalar>;

LiveOilPvt()
{
vapPar2_ = 0.0;
}

LiveOilPvt(const std::vector<Scalar>& gasReferenceDensity,
const std::vector<Scalar>& oilReferenceDensity,
const std::vector<TabulatedTwoDFunction>& inverseOilBTable,
const std::vector<TabulatedTwoDFunction>& oilMuTable,
const std::vector<TabulatedTwoDFunction>& inverseOilBMuTable,
const std::vector<TabulatedOneDFunction>& saturatedOilMuTable,
const std::vector<TabulatedOneDFunction>& inverseSaturatedOilBTable,
const std::vector<TabulatedOneDFunction>& inverseSaturatedOilBMuTable,
const std::vector<TabulatedOneDFunction>& saturatedGasDissolutionFactorTable,
const std::vector<TabulatedOneDFunction>& saturationPressure,
Scalar vapPar2)
: gasReferenceDensity_(gasReferenceDensity)
, oilReferenceDensity_(oilReferenceDensity)
, inverseOilBTable_(inverseOilBTable)
, oilMuTable_(oilMuTable)
, inverseOilBMuTable_(inverseOilBMuTable)
, saturatedOilMuTable_(saturatedOilMuTable)
, inverseSaturatedOilBTable_(inverseSaturatedOilBTable)
, inverseSaturatedOilBMuTable_(inverseSaturatedOilBMuTable)
, saturatedGasDissolutionFactorTable_(saturatedGasDissolutionFactorTable)
, saturationPressure_(saturationPressure)
, vapPar2_(vapPar2)
{ }

#if HAVE_ECL_INPUT
/*!
* \brief Initialize the oil parameters via the data specified by the PVTO ECL keyword.
Expand Down Expand Up @@ -448,10 +419,11 @@ class LiveOilPvt
{
throw std::runtime_error("Not implemented: The PVT model does not provide a diffusionCoefficient()");
}
const Scalar gasReferenceDensity(unsigned regionIdx) const

Scalar gasReferenceDensity(unsigned regionIdx) const
{ return gasReferenceDensity_[regionIdx]; }

const Scalar oilReferenceDensity(unsigned regionIdx) const
Scalar oilReferenceDensity(unsigned regionIdx) const
{ return oilReferenceDensity_[regionIdx]; }

const std::vector<TabulatedTwoDFunction>& inverseOilBTable() const
Expand Down Expand Up @@ -481,20 +453,6 @@ class LiveOilPvt
Scalar vapPar2() const
{ return vapPar2_; }

bool operator==(const LiveOilPvt<Scalar>& data) const
{
return this->gasReferenceDensity_ == data.gasReferenceDensity_ &&
this->oilReferenceDensity_ == data.oilReferenceDensity_ &&
this->inverseOilBTable() == data.inverseOilBTable() &&
this->oilMuTable() == data.oilMuTable() &&
this->inverseOilBMuTable() == data.inverseOilBMuTable() &&
this->saturatedOilMuTable() == data.saturatedOilMuTable() &&
this->inverseSaturatedOilBTable() == data.inverseSaturatedOilBTable() &&
this->inverseSaturatedOilBMuTable() == data.inverseSaturatedOilBMuTable() &&
this->saturatedGasDissolutionFactorTable() == data.saturatedGasDissolutionFactorTable() &&
this->vapPar2() == data.vapPar2();
}

private:
void updateSaturationPressure_(unsigned regionIdx)
{
Expand Down Expand Up @@ -538,7 +496,7 @@ class LiveOilPvt
std::vector<TabulatedOneDFunction> saturatedGasDissolutionFactorTable_;
std::vector<TabulatedOneDFunction> saturationPressure_;

Scalar vapPar2_;
Scalar vapPar2_ = 0.0;
};

} // namespace Opm
Expand Down

0 comments on commit 219536d

Please sign in to comment.