Changed return value for option to bool

This commit is contained in:
Fredrik Gundersen
2015-10-09 09:50:09 +02:00
parent 80a77136cf
commit ec74096dcb
3 changed files with 5 additions and 9 deletions

View File

@@ -23,13 +23,9 @@ namespace Opm {
}
}
const std::string OilVaporizationProperties::getOption() const{
const bool OilVaporizationProperties::getOption() const{
if (m_type == Opm::OilVaporizationEnum::DRSDT){
if (m_maxDRSDT_allCells){
return std::string("ALL");
}else{
return std::string("FREE");
}
return m_maxDRSDT_allCells;
}else{
throw std::logic_error("Only valid if type is DRSDT");
}

View File

@@ -26,7 +26,7 @@ namespace Opm
double getVap2() const;
double getMaxDRSDT() const;
double getMaxDRVDT() const;
const std::string getOption() const;
const bool getOption() const;
private:
OilVaporizationProperties();

View File

@@ -1174,8 +1174,8 @@ BOOST_AUTO_TEST_CASE(createDeckWithDRSDT) {
size_t currentStep = 1;
BOOST_CHECK_EQUAL(schedule.hasOilVaporizationProperties(), true);
OilVaporizationPropertiesConstPtr ovap = schedule.getOilVaporizationProperties(currentStep);
std::string value = ovap->getOption();
BOOST_CHECK_EQUAL("ALL", value);
BOOST_CHECK_EQUAL(true, ovap->getOption());
BOOST_CHECK_EQUAL(ovap->getType(), Opm::OilVaporizationEnum::DRSDT);
}