Remove shared_ptr typedef in TimeMap

This commit is contained in:
Jørgen Kvalsvik
2016-10-12 12:26:14 +02:00
parent 8645af71b8
commit 239ef7a34c
10 changed files with 53 additions and 58 deletions

View File

@@ -1355,8 +1355,8 @@ namespace Opm {
}
}
TimeMapConstPtr Schedule::getTimeMap() const {
return m_timeMap;
const TimeMap& Schedule::getTimeMap() const {
return *m_timeMap;
}
const GroupTree& Schedule::getGroupTree(size_t timeStep) const {

View File

@@ -67,7 +67,7 @@ namespace Opm
time_t posixEndTime() const;
std::shared_ptr< const TimeMap > getTimeMap() const;
const TimeMap& getTimeMap() const;
size_t numWells() const;
size_t numWells(size_t timestep) const;

View File

@@ -34,8 +34,6 @@ namespace Opm {
m_timeList.push_back( boost::posix_time::ptime(startDate) );
}
TimeMap::TimeMap(Opm::DeckConstPtr deck) : TimeMap( *deck ) {}
TimeMap::TimeMap( const Deck& deck) {
// The default start date is not specified in the Eclipse
// reference manual. We hence just assume it is same as for

View File

@@ -34,7 +34,6 @@ namespace Opm {
class TimeMap {
public:
explicit TimeMap(boost::posix_time::ptime startDate);
explicit TimeMap(std::shared_ptr< const Deck > deck);
explicit TimeMap( const Deck& deck);
void addTime(boost::posix_time::ptime newTime);
@@ -75,8 +74,6 @@ namespace Opm {
std::vector<size_t> m_first_timestep_years; // A list of the first timestep of every year
std::vector<size_t> m_first_timestep_months; // A list of the first timestep of every month
};
typedef std::shared_ptr<TimeMap> TimeMapPtr;
typedef std::shared_ptr<const TimeMap> TimeMapConstPtr;
}

View File

@@ -34,7 +34,7 @@ namespace Opm {
Well::Well(const std::string& name_, int headI,
int headJ, Value<double> refDepth , Phase::PhaseEnum preferredPhase,
TimeMapConstPtr timeMap, size_t creationTimeStep,
std::shared_ptr< const TimeMap > timeMap, size_t creationTimeStep,
WellCompletion::CompletionOrderEnum completionOrdering,
bool allowCrossFlow, bool automaticShutIn)
: m_status(new DynamicState<WellCommon::StatusEnum>(*timeMap, WellCommon::SHUT)),

View File

@@ -89,15 +89,15 @@ BOOST_AUTO_TEST_CASE(AddDateNegativeStepThrows) {
BOOST_AUTO_TEST_CASE(AddStepSizeCorrect) {
boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1);
std::shared_ptr<Opm::TimeMap> timeMap = std::make_shared<Opm::TimeMap>(boost::posix_time::ptime(boost::posix_time::ptime(startDate)));
Opm::TimeMap timeMap{ boost::posix_time::ptime(boost::posix_time::ptime(startDate)) };
timeMap->addTStep( boost::posix_time::hours(1));
timeMap->addTStep( boost::posix_time::hours(23));
BOOST_CHECK_EQUAL( 3U , timeMap->size());
timeMap.addTStep( boost::posix_time::hours(1));
timeMap.addTStep( boost::posix_time::hours(23));
BOOST_CHECK_EQUAL( 3U , timeMap.size());
BOOST_CHECK_THROW( (*timeMap)[3] , std::invalid_argument );
BOOST_CHECK_EQUAL( (*timeMap)[0] , boost::posix_time::ptime(boost::posix_time::ptime(startDate)));
BOOST_CHECK_EQUAL( (*timeMap)[2] , boost::posix_time::ptime(boost::posix_time::ptime( boost::gregorian::date( 2010 , boost::gregorian::Jan , 2 ))));
BOOST_CHECK_THROW( timeMap[3] , std::invalid_argument );
BOOST_CHECK_EQUAL( timeMap[0] , boost::posix_time::ptime(boost::posix_time::ptime(startDate)));
BOOST_CHECK_EQUAL( timeMap[2] , boost::posix_time::ptime(boost::posix_time::ptime( boost::gregorian::date( 2010 , boost::gregorian::Jan , 2 ))));
}
@@ -233,7 +233,7 @@ BOOST_AUTO_TEST_CASE(TimeStepsCorrect) {
Opm::ParserPtr parser(new Opm::Parser(/*addDefault=*/true));
Opm::DeckPtr deck = parser->parseString(deckData, Opm::ParseContext());
Opm::TimeMap tmap(deck);
Opm::TimeMap tmap(*deck);
BOOST_CHECK_EQUAL(tmap.getStartTime(/*timeLevelIdx=*/0),
boost::posix_time::ptime(boost::gregorian::date(1981, 5, 21)));
@@ -304,7 +304,7 @@ BOOST_AUTO_TEST_CASE(initTimestepsYearsAndMonths) {
Opm::ParserPtr parser(new Opm::Parser(true));
Opm::DeckPtr deck = parser->parseString(deckData, Opm::ParseContext());
const Opm::TimeMap tmap(deck);
const Opm::TimeMap tmap(*deck);
/*deckData timesteps:
0 21 may 1981 START

View File

@@ -31,9 +31,9 @@
using namespace Opm;
static Opm::TimeMapPtr createXDaysTimeMap(size_t numDays) {
static std::shared_ptr< Opm::TimeMap > createXDaysTimeMap(size_t numDays) {
boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1);
Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate)));
auto timeMap = std::make_shared< Opm::TimeMap >(boost::posix_time::ptime(startDate));
for (size_t i = 0; i < numDays; i++)
timeMap->addTStep( boost::posix_time::hours( (i+1) * 24 ));
return timeMap;
@@ -52,7 +52,7 @@ BOOST_AUTO_TEST_CASE(CreatEmptyWellSet) {
BOOST_AUTO_TEST_CASE(AddAndDeleteWell) {
Opm::WellSet wellSet;
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
auto well = std::make_shared< Well >("WELL1", 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0);
auto well2 = std::make_shared< Well >("WELL2", 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0);
@@ -77,7 +77,7 @@ BOOST_AUTO_TEST_CASE(AddAndDeleteWell) {
BOOST_AUTO_TEST_CASE(AddWellSameName) {
Opm::WellSet wellSet;
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
auto well1 = std::make_shared< Well >("WELL", 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::OIL, timeMap, 0);
auto well2 = std::make_shared< Well >("WELL", 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::OIL, timeMap, 0);
@@ -91,7 +91,7 @@ BOOST_AUTO_TEST_CASE(AddWellSameName) {
BOOST_AUTO_TEST_CASE(Iterator) {
Opm::WellSet wellSet;
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
auto well1 = std::make_shared< Well >("WELL", 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0);
auto well2 = std::make_shared< Well >("WELL", 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0);

View File

@@ -41,23 +41,23 @@
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
static Opm::TimeMapPtr createXDaysTimeMap(size_t numDays) {
static std::shared_ptr< Opm::TimeMap > createXDaysTimeMap(size_t numDays) {
boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1);
Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate)));
auto timeMap = std::make_shared< Opm::TimeMap >(boost::posix_time::ptime(startDate));
for (size_t i = 0; i < numDays; i++)
timeMap->addTStep( boost::posix_time::hours( (i+1) * 24 ));
return timeMap;
}
BOOST_AUTO_TEST_CASE(CreateWell_CorrectNameAndDefaultValues) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
Opm::Well well("WELL1" , 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0);
BOOST_CHECK_EQUAL( "WELL1" , well.name() );
BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).OilRate);
}
BOOST_AUTO_TEST_CASE(CreateWell_GetProductionPropertiesShouldReturnSameObject) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
Opm::Well well("WELL1" , 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0);
BOOST_CHECK_EQUAL(&(well.getProductionProperties(5)), &(well.getProductionProperties(5)));
@@ -66,7 +66,7 @@ BOOST_AUTO_TEST_CASE(CreateWell_GetProductionPropertiesShouldReturnSameObject) {
}
BOOST_AUTO_TEST_CASE(CreateWell_GetInjectionPropertiesShouldReturnSameObject) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
Opm::Well well("WELL1" , 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::WATER, timeMap , 0);
BOOST_CHECK_EQUAL(&(well.getInjectionProperties(5)), &(well.getInjectionProperties(5)));
@@ -75,7 +75,7 @@ BOOST_AUTO_TEST_CASE(CreateWell_GetInjectionPropertiesShouldReturnSameObject) {
}
BOOST_AUTO_TEST_CASE(CreateWellCreateTimeStepOK) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
Opm::Well well("WELL1" , 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::OIL, timeMap , 5);
BOOST_CHECK_EQUAL( false , well.hasBeenDefined(0) );
BOOST_CHECK_EQUAL( false , well.hasBeenDefined(4) );
@@ -86,7 +86,7 @@ BOOST_AUTO_TEST_CASE(CreateWellCreateTimeStepOK) {
BOOST_AUTO_TEST_CASE(setWellProductionProperties_PropertiesSetCorrect) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
Opm::Well well("WELL1" , 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0);
BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy( 5 ).OilRate);
@@ -110,7 +110,7 @@ BOOST_AUTO_TEST_CASE(setWellProductionProperties_PropertiesSetCorrect) {
}
BOOST_AUTO_TEST_CASE(setOilRate_RateSetCorrect) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
Opm::Well well("WELL1" , 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0);
BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).OilRate);
@@ -122,7 +122,7 @@ BOOST_AUTO_TEST_CASE(setOilRate_RateSetCorrect) {
}
BOOST_AUTO_TEST_CASE(seLiquidRate_RateSetCorrect) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
Opm::Well well("WELL1" , 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0);
BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).LiquidRate);
@@ -135,7 +135,7 @@ BOOST_AUTO_TEST_CASE(seLiquidRate_RateSetCorrect) {
BOOST_AUTO_TEST_CASE(setPredictionModeProduction_ModeSetCorrect) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
Opm::Well well("WELL1" , 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0);
BOOST_CHECK_EQUAL( true, well.getProductionPropertiesCopy(5).predictionMode);
@@ -149,7 +149,7 @@ BOOST_AUTO_TEST_CASE(setPredictionModeProduction_ModeSetCorrect) {
BOOST_AUTO_TEST_CASE(setpredictionModeInjection_ModeSetCorrect) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
Opm::Well well("WELL1" , 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::WATER, timeMap , 0);
BOOST_CHECK_EQUAL( true, well.getInjectionPropertiesCopy(5).predictionMode);
@@ -313,7 +313,7 @@ BOOST_AUTO_TEST_CASE(WellCOMPDATtestINPUT) {
}
BOOST_AUTO_TEST_CASE(NewWellZeroCompletions) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
Opm::Well well("WELL1" , 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0);
Opm::CompletionSetConstPtr completions = well.getCompletions( 0 );
BOOST_CHECK_EQUAL( 0U , completions->size());
@@ -321,7 +321,7 @@ BOOST_AUTO_TEST_CASE(NewWellZeroCompletions) {
BOOST_AUTO_TEST_CASE(UpdateCompletions) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
Opm::Well well("WELL1" , 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0);
Opm::CompletionSetConstPtr completions = well.getCompletions( 0 );
@@ -375,7 +375,7 @@ Opm::CompletionPtr completion(const size_t i, const size_t j, const size_t k)
BOOST_AUTO_TEST_CASE(CompletionOrder) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
{
// Vertical well.
Opm::Well well("WELL1" , 5, 5, Opm::Value<double>("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0);
@@ -432,7 +432,7 @@ BOOST_AUTO_TEST_CASE(CompletionOrder) {
BOOST_AUTO_TEST_CASE(setGasRate_RateSetCorrect) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
Opm::Well well("WELL1" , 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::GAS, timeMap , 0);
BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).GasRate);
@@ -446,7 +446,7 @@ BOOST_AUTO_TEST_CASE(setGasRate_RateSetCorrect) {
BOOST_AUTO_TEST_CASE(setWaterRate_RateSetCorrect) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
Opm::Well well("WELL1" , 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::WATER, timeMap , 0);
BOOST_CHECK_EQUAL(0.0 , well.getProductionPropertiesCopy(5).WaterRate);
@@ -459,7 +459,7 @@ BOOST_AUTO_TEST_CASE(setWaterRate_RateSetCorrect) {
BOOST_AUTO_TEST_CASE(setSurfaceInjectionRate_RateSetCorrect) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
Opm::Well well("WELL1" , 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::WATER, timeMap , 0);
BOOST_CHECK_EQUAL(0.0 , well.getInjectionPropertiesCopy(5).surfaceInjectionRate);
@@ -472,7 +472,7 @@ BOOST_AUTO_TEST_CASE(setSurfaceInjectionRate_RateSetCorrect) {
BOOST_AUTO_TEST_CASE(setReservoirInjectionRate_RateSetCorrect) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
Opm::Well well("WELL1" , 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::WATER, timeMap , 0);
BOOST_CHECK_EQUAL(0.0 , well.getInjectionPropertiesCopy(5).reservoirInjectionRate);
@@ -487,7 +487,7 @@ BOOST_AUTO_TEST_CASE(setReservoirInjectionRate_RateSetCorrect) {
BOOST_AUTO_TEST_CASE(isProducerCorrectlySet) {
// HACK: This test checks correctly setting of isProducer/isInjector. This property depends on which of
// WellProductionProperties/WellInjectionProperties is set last, independent of actual values.
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
Opm::Well well("WELL1" , 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::OIL, timeMap ,0);
/* 1: Well is created as producer */
@@ -543,7 +543,7 @@ BOOST_AUTO_TEST_CASE(isProducerCorrectlySet) {
BOOST_AUTO_TEST_CASE(GroupnameCorretlySet) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
Opm::Well well("WELL1" , 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::WATER, timeMap ,0);
BOOST_CHECK_EQUAL("" , well.getGroupName(2));
@@ -557,7 +557,7 @@ BOOST_AUTO_TEST_CASE(GroupnameCorretlySet) {
BOOST_AUTO_TEST_CASE(addWELSPECS_setData_dataSet) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
Opm::Well well("WELL1", 23, 42, Opm::Value<double>("REF_DEPTH" , 2334.32) , Opm::Phase::WATER, timeMap, 3);
BOOST_CHECK(!well.hasBeenDefined(2));
@@ -570,7 +570,7 @@ BOOST_AUTO_TEST_CASE(addWELSPECS_setData_dataSet) {
BOOST_AUTO_TEST_CASE(XHPLimitDefault) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
Opm::Well well("WELL1", 1, 2, Opm::Value<double>("REF_DEPTH" , 2334.32), Opm::Phase::WATER, timeMap, 0);
@@ -591,7 +591,7 @@ BOOST_AUTO_TEST_CASE(XHPLimitDefault) {
BOOST_AUTO_TEST_CASE(InjectorType) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
Opm::Well well("WELL1", 1, 2, Opm::Value<double>("REF_DEPTH" , 2334.32), Opm::Phase::WATER, timeMap, 0);
Opm::WellInjectionProperties injectionProps(well.getInjectionPropertiesCopy(1));
@@ -606,7 +606,7 @@ BOOST_AUTO_TEST_CASE(InjectorType) {
BOOST_AUTO_TEST_CASE(WellStatus) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(10);
auto timeMap = createXDaysTimeMap(10);
Opm::Well well("WELL1" , 0, 0, Opm::Value<double>("REF_DEPTH"), Opm::Phase::OIL, timeMap , 0);
@@ -628,7 +628,7 @@ BOOST_AUTO_TEST_CASE(WellStatus) {
BOOST_AUTO_TEST_CASE(WellHaveProductionControlLimit) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(20);
auto timeMap = createXDaysTimeMap(20);
Opm::Well well("WELL1", 1, 2, Opm::Value<double>("REF_DEPTH" , 2334.32), Opm::Phase::OIL, timeMap, 0);
@@ -678,7 +678,7 @@ BOOST_AUTO_TEST_CASE(WellHaveProductionControlLimit) {
BOOST_AUTO_TEST_CASE(WellHaveInjectionControlLimit) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(20);
auto timeMap = createXDaysTimeMap(20);
Opm::Well well("WELL1", 1, 2, Opm::Value<double>("REF_DEPTH" , 2334.32), Opm::Phase::WATER, timeMap, 0);
BOOST_CHECK( !well.getInjectionPropertiesCopy(1).hasInjectionControl( Opm::WellInjector::RATE ));
@@ -722,7 +722,7 @@ BOOST_AUTO_TEST_CASE(WellHaveInjectionControlLimit) {
BOOST_AUTO_TEST_CASE(WellSetAvailableForGroupControl_ControlSet) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(20);
auto timeMap = createXDaysTimeMap(20);
Opm::Well well("WELL1", 1, 2, Opm::Value<double>("REF_DEPTH" , 2334.32), Opm::Phase::WATER, timeMap, 0);
BOOST_CHECK(well.isAvailableForGroupControl(10));
@@ -733,7 +733,7 @@ BOOST_AUTO_TEST_CASE(WellSetAvailableForGroupControl_ControlSet) {
}
BOOST_AUTO_TEST_CASE(WellSetGuideRate_GuideRateSet) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(20);
auto timeMap = createXDaysTimeMap(20);
Opm::Well well("WELL1", 1, 2, Opm::Value<double>("REF_DEPTH" , 2334.32), Opm::Phase::WATER, timeMap, 0);
BOOST_CHECK_LT(well.getGuideRate(0), 0);
@@ -743,7 +743,7 @@ BOOST_AUTO_TEST_CASE(WellSetGuideRate_GuideRateSet) {
}
BOOST_AUTO_TEST_CASE(WellGuideRatePhase_GuideRatePhaseSet) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(20);
auto timeMap = createXDaysTimeMap(20);
Opm::Well well("WELL1", 1, 2, Opm::Value<double>("REF_DEPTH" , 2334.32), Opm::Phase::WATER, timeMap, 0);
BOOST_CHECK_EQUAL(Opm::GuideRate::UNDEFINED, well.getGuideRatePhase(0));
well.setGuideRatePhase(3, Opm::GuideRate::RAT);
@@ -753,7 +753,7 @@ BOOST_AUTO_TEST_CASE(WellGuideRatePhase_GuideRatePhaseSet) {
BOOST_AUTO_TEST_CASE(WellSetScalingFactor_ScalingFactorSetSet) {
Opm::TimeMapPtr timeMap = createXDaysTimeMap(20);
auto timeMap = createXDaysTimeMap(20);
Opm::Well well("WELL1", 1, 2, Opm::Value<double>("REF_DEPTH" , 2334.32), Opm::Phase::WATER, timeMap, 0);
BOOST_CHECK_EQUAL(1.0, well.getGuideRateScalingFactor(0));
well.setGuideRateScalingFactor(4, 0.6);

View File

@@ -215,7 +215,7 @@ inline void keywordC( std::vector< ERT::smspec_node >& list,
std::array< int, 3 > dims ) {
const auto& keywordstring = keyword.name();
const auto last_timestep = schedule.getTimeMap()->last();
const auto last_timestep = schedule.getTimeMap().last();
for( const auto& record : keyword ) {