Changed return value for option to bool
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user