Refactor enum for GuideRate target

This commit is contained in:
Joakim Hove
2019-09-02 12:49:20 +02:00
parent e026660c80
commit af72086db8
6 changed files with 52 additions and 49 deletions

View File

@@ -26,8 +26,20 @@ namespace Opm {
class GuideRateModel {
public:
enum class Target {
OIL = 0,
LIQ = 1,
GAS = 2,
RES = 3,
COMB = 4,
NONE = 5
};
static Target TargetFromString(const std::string& s);
GuideRateModel(double time_interval_arg,
GuideRateTarget phase_arg,
Target target_arg,
double A_arg,
double B_arg,
double C_arg,
@@ -50,7 +62,7 @@ private:
be evaluated, due to a division by zero problem.
*/
double time_interval = 0;
GuideRateTarget phase = GuideRateTarget::NONE;
Target target = Target::NONE;
double A = 0;
double B = 0;
double C = 0;