mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Refactor methods getXyzRateWithLimit_()
Refactors getOilRateWithLimit_(), getGasRateWithLimit_(), and getWaterRateWithLimit_() in GasLiftSingleWellGeneric.cpp. The common part of the methods is split out into a new method called getRateWithLimit_(). The purpose of the refactorization is to reduce reptetive code and make the code easier to maintain.
This commit is contained in:
@@ -178,25 +178,30 @@ protected:
|
||||
void displayWarning_(const std::string& warning);
|
||||
|
||||
std::pair<double, bool> getBhpWithLimit_(double bhp) const;
|
||||
std::pair<double, bool> getGasRateWithLimit_(const std::vector<double>& potentials) const;
|
||||
std::tuple<double,double,double,bool,bool,bool>
|
||||
getInitialRatesWithLimit_(const std::vector<double>& potentials);
|
||||
std::tuple<double, const std::string*, double> getRateWithGroupLimit_(
|
||||
Rate rate_type, const double new_rate, const double old_rate) const;
|
||||
std::pair<double, bool> getOilRateWithLimit_(
|
||||
const std::vector<double>& potentials) const;
|
||||
std::pair<double, bool> getWaterRateWithLimit_(
|
||||
const std::vector<double>& potentials) const;
|
||||
|
||||
std::pair<double, bool> getOilRateWithGroupLimit_(
|
||||
double new_oil_rate, double oil_rate) const;
|
||||
std::pair<double, bool> getGasRateWithLimit_(
|
||||
const std::vector<double>& potentials) const;
|
||||
std::pair<double, bool> getGasRateWithGroupLimit_(
|
||||
double new_gas_rate, double gas_rate) const;
|
||||
std::pair<double, bool> getWaterRateWithGroupLimit_(
|
||||
double new_water_rate, double water_rate) const;
|
||||
std::tuple<double,double,double,bool,bool,bool> getInitialRatesWithLimit_(
|
||||
const std::vector<double>& potentials);
|
||||
std::tuple<double,double,bool,bool> getLiquidRateWithGroupLimit_(
|
||||
const double new_oil_rate, const double oil_rate,
|
||||
const double new_water_rate, const double water_rate) const;
|
||||
std::pair<double, bool> getOilRateWithGroupLimit_(
|
||||
double new_oil_rate, double oil_rate) const;
|
||||
std::pair<double, bool> getOilRateWithLimit_(
|
||||
const std::vector<double>& potentials) const;
|
||||
double getProductionTarget_(Rate rate) const;
|
||||
double getRate_(Rate rate_type, const std::vector<double>& potentials) const;
|
||||
std::pair<double, bool> getRateWithLimit_(
|
||||
Rate rate_type, const std::vector<double>& potentials) const;
|
||||
std::tuple<double, const std::string*, double> getRateWithGroupLimit_(
|
||||
Rate rate_type, const double new_rate, const double old_rate) const;
|
||||
std::pair<double, bool> getWaterRateWithGroupLimit_(
|
||||
double new_water_rate, double water_rate) const;
|
||||
std::pair<double, bool> getWaterRateWithLimit_(
|
||||
const std::vector<double>& potentials) const;
|
||||
bool hasProductionControl_(Rate rate) const;
|
||||
|
||||
std::tuple<double,double,bool,bool,double>
|
||||
increaseALQtoPositiveOilRate_(double alq,
|
||||
|
||||
Reference in New Issue
Block a user