Refactor Well GuideRateTarget enum

This commit is contained in:
Joakim Hove
2019-09-02 13:44:46 +02:00
parent ee26316f92
commit 7bdd294ec5
9 changed files with 132 additions and 136 deletions

View File

@@ -398,10 +398,10 @@ BOOST_AUTO_TEST_CASE(WellHaveInjectionControlLimit) {
BOOST_AUTO_TEST_CASE(WellGuideRatePhase_GuideRatePhaseSet) {
Opm::Well2 well("WELL1" , "GROUP", 0, 1, 0, 0, 0.0, Opm::Phase::OIL, Opm::Well2::ProducerCMode::CMODE_UNDEFINED, Connection::Order::DEPTH, UnitSystem::newMETRIC(), 0);
BOOST_CHECK_EQUAL(Opm::GuideRate::UNDEFINED, well.getGuideRatePhase());
BOOST_CHECK(Opm::Well2::GuideRateTarget::UNDEFINED == well.getGuideRatePhase());
BOOST_CHECK(well.updateWellGuideRate(true, 100, Opm::GuideRate::RAT, 66.0));
BOOST_CHECK_EQUAL(Opm::GuideRate::RAT, well.getGuideRatePhase());
BOOST_CHECK(well.updateWellGuideRate(true, 100, Opm::Well2::GuideRateTarget::RAT, 66.0));
BOOST_CHECK(Opm::Well2::GuideRateTarget::RAT == well.getGuideRatePhase());
BOOST_CHECK_EQUAL(100, well.getGuideRate());
BOOST_CHECK_EQUAL(66.0, well.getGuideRateScalingFactor());
}