Removed EclipseGrid member from Schedule class.
This commit is contained in:
@@ -60,7 +60,7 @@ namespace Opm {
|
||||
m_gridDims( deck ),
|
||||
m_inputGrid( std::make_shared<EclipseGrid>(deck, nullptr) ),
|
||||
m_transMult( m_inputGrid->getNX(), m_inputGrid->getNY(), m_inputGrid->getNZ()),
|
||||
m_schedule( std::make_shared<Schedule>( m_parseContext, m_inputGrid, deck ) ),
|
||||
m_schedule( std::make_shared<Schedule>( m_parseContext, *m_inputGrid, deck ) ),
|
||||
m_eclipseProperties( deck, m_tables, *m_inputGrid ),
|
||||
m_eclipseConfig( deck, m_eclipseProperties, m_gridDims, *m_schedule , parseContext),
|
||||
m_inputNnc( deck, m_gridDims ),
|
||||
|
||||
@@ -58,16 +58,15 @@ namespace Opm {
|
||||
|
||||
|
||||
Schedule::Schedule(const ParseContext& parseContext,
|
||||
std::shared_ptr<const EclipseGrid> grid,
|
||||
const EclipseGrid& grid,
|
||||
std::shared_ptr< const Deck > deckptr ) :
|
||||
Schedule(parseContext, grid, *deckptr )
|
||||
{}
|
||||
|
||||
Schedule::Schedule( const ParseContext& parseContext,
|
||||
std::shared_ptr<const EclipseGrid> grid,
|
||||
const EclipseGrid& grid,
|
||||
const Deck& deck ) :
|
||||
m_timeMap( std::make_shared< TimeMap>( deck )),
|
||||
m_grid( grid )
|
||||
m_timeMap( std::make_shared< TimeMap>( deck ))
|
||||
{
|
||||
m_tuning.reset(new Tuning(m_timeMap));
|
||||
m_events.reset(new Events(m_timeMap));
|
||||
@@ -78,7 +77,7 @@ namespace Opm {
|
||||
|
||||
if (Section::hasSCHEDULE(deck)) {
|
||||
std::shared_ptr<SCHEDULESection> scheduleSection = std::make_shared<SCHEDULESection>(deck);
|
||||
iterateScheduleSection(parseContext , *scheduleSection );
|
||||
iterateScheduleSection(parseContext , *scheduleSection , grid );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +99,7 @@ namespace Opm {
|
||||
}
|
||||
|
||||
|
||||
void Schedule::iterateScheduleSection(const ParseContext& parseContext , const SCHEDULESection& section ) {
|
||||
void Schedule::iterateScheduleSection(const ParseContext& parseContext , const SCHEDULESection& section , const EclipseGrid& grid) {
|
||||
/*
|
||||
geoModifiers is a list of geo modifiers which can be found in the schedule
|
||||
section. This is only partly supported, support is indicated by the bool
|
||||
@@ -162,7 +161,7 @@ namespace Opm {
|
||||
handleWGRUPCON(keyword, currentStep);
|
||||
|
||||
else if (keyword.name() == "COMPDAT")
|
||||
handleCOMPDAT(keyword, currentStep);
|
||||
handleCOMPDAT(keyword, currentStep, grid);
|
||||
|
||||
else if (keyword.name() == "WELSEGS")
|
||||
handleWELSEGS(keyword, currentStep);
|
||||
@@ -1134,9 +1133,9 @@ namespace Opm {
|
||||
}
|
||||
|
||||
|
||||
void Schedule::handleCOMPDAT( const DeckKeyword& keyword, size_t currentStep) {
|
||||
void Schedule::handleCOMPDAT( const DeckKeyword& keyword, size_t currentStep, const EclipseGrid& grid) {
|
||||
const auto wells = this->getWells( currentStep );
|
||||
auto completions = Completion::fromCOMPDAT( *m_grid, keyword, wells );
|
||||
auto completions = Completion::fromCOMPDAT( grid, keyword, wells );
|
||||
|
||||
for( const auto pair : completions ) {
|
||||
auto& well = *this->m_wells.get( pair.first );
|
||||
|
||||
@@ -51,10 +51,11 @@ namespace Opm
|
||||
|
||||
class Schedule {
|
||||
public:
|
||||
Schedule(const ParseContext& parseContext, std::shared_ptr<const EclipseGrid> grid,
|
||||
Schedule(const ParseContext& parseContext, const EclipseGrid& grid,
|
||||
const Deck& deck );
|
||||
|
||||
/// [deprecated]
|
||||
Schedule(const ParseContext& parseContext, std::shared_ptr<const EclipseGrid> grid,
|
||||
Schedule(const ParseContext& parseContext, const EclipseGrid& grid,
|
||||
std::shared_ptr<const Deck> deck );
|
||||
|
||||
/*
|
||||
@@ -94,7 +95,6 @@ namespace Opm
|
||||
private:
|
||||
std::shared_ptr< TimeMap > m_timeMap;
|
||||
OrderedMap<std::shared_ptr< Well >> m_wells;
|
||||
std::shared_ptr<const EclipseGrid> m_grid;
|
||||
std::map<std::string , std::shared_ptr< Group >> m_groups;
|
||||
std::shared_ptr<DynamicState<std::shared_ptr< GroupTree >> > m_rootGroupTree;
|
||||
std::shared_ptr<DynamicState<std::shared_ptr< OilVaporizationProperties > > > m_oilvaporizationproperties;
|
||||
@@ -109,7 +109,7 @@ namespace Opm
|
||||
void addWellToGroup( Group& newGroup , Well& well , size_t timeStep);
|
||||
void initRootGroupTreeNode(std::shared_ptr< const TimeMap > timeMap);
|
||||
void initOilVaporization(std::shared_ptr< const TimeMap > timeMap);
|
||||
void iterateScheduleSection(const ParseContext& parseContext , const SCHEDULESection& );
|
||||
void iterateScheduleSection(const ParseContext& parseContext , const SCHEDULESection& , const EclipseGrid& grid);
|
||||
bool handleGroupFromWELSPECS(const std::string& groupName, std::shared_ptr< GroupTree > newTree) const;
|
||||
void addGroup(const std::string& groupName , size_t timeStep);
|
||||
void addWell(const std::string& wellName, const DeckRecord& record, size_t timeStep, WellCompletion::CompletionOrderEnum wellCompletionOrder);
|
||||
@@ -120,7 +120,7 @@ namespace Opm
|
||||
void handleWCONHIST( const DeckKeyword& keyword, size_t currentStep);
|
||||
void handleWCONPROD( const DeckKeyword& keyword, size_t currentStep);
|
||||
void handleWGRUPCON( const DeckKeyword& keyword, size_t currentStep);
|
||||
void handleCOMPDAT( const DeckKeyword& keyword, size_t currentStep);
|
||||
void handleCOMPDAT( const DeckKeyword& keyword, size_t currentStep, const EclipseGrid& grid);
|
||||
void handleWELSEGS( const DeckKeyword& keyword, size_t currentStep);
|
||||
void handleCOMPSEGS( const DeckKeyword& keyword, size_t currentStep);
|
||||
void handleWCONINJE( const SCHEDULESection&, const DeckKeyword& keyword, size_t currentStep);
|
||||
|
||||
@@ -73,7 +73,7 @@ BOOST_AUTO_TEST_CASE( CheckUnsoppertedInSCHEDULE ) {
|
||||
Parser parser(true);
|
||||
|
||||
auto deck = parser.parseString( deckString , parseContext );
|
||||
std::shared_ptr<EclipseGrid> grid = std::make_shared<EclipseGrid>( deck );
|
||||
EclipseGrid grid( deck );
|
||||
|
||||
parseContext.update( ParseContext::UNSUPPORTED_SCHEDULE_GEO_MODIFIER , InputError::IGNORE );
|
||||
{
|
||||
|
||||
@@ -282,7 +282,7 @@ BOOST_AUTO_TEST_CASE(createDeckWithGEFAC) {
|
||||
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::DeckPtr deck = parser.parseString(input, parseContext);
|
||||
std::shared_ptr<const Opm::EclipseGrid> grid = std::make_shared<const Opm::EclipseGrid>(10, 10, 10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Opm::Schedule schedule(parseContext , grid, deck );
|
||||
|
||||
const auto* group1 = schedule.getGroup("PRODUC");
|
||||
@@ -329,7 +329,7 @@ BOOST_AUTO_TEST_CASE(createDeckWithWGRUPCONandWCONPROD) {
|
||||
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::DeckPtr deck = parser.parseString(input, parseContext);
|
||||
std::shared_ptr<const Opm::EclipseGrid> grid = std::make_shared<const Opm::EclipseGrid>(10, 10, 10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Opm::Schedule schedule(parseContext , grid, deck );
|
||||
const auto* currentWell = schedule.getWell("B-37T2");
|
||||
const Opm::WellProductionProperties& wellProductionProperties = currentWell->getProductionProperties(0);
|
||||
|
||||
@@ -197,14 +197,14 @@ static DeckPtr createDeckWithWellsAndCompletionData() {
|
||||
BOOST_AUTO_TEST_CASE(CreateScheduleDeckMissingReturnsDefaults) {
|
||||
DeckPtr deck(new Deck());
|
||||
deck->addKeyword( DeckKeyword( "SCHEDULE" ) );
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
BOOST_CHECK_EQUAL( schedule.getStartTime() , boost::posix_time::ptime(boost::gregorian::date( 1983 , boost::gregorian::Jan , 1)));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateScheduleDeckWellsOrdered) {
|
||||
DeckPtr deck = createDeckWithWellsOrdered();
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(100,100,100);
|
||||
EclipseGrid grid(100,100,100);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
auto wells = schedule.getWells();
|
||||
|
||||
@@ -215,21 +215,21 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWellsOrdered) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithStart) {
|
||||
DeckPtr deck = createDeck();
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
BOOST_CHECK_EQUAL( schedule.getStartTime() , boost::posix_time::ptime(boost::gregorian::date( 1998 , boost::gregorian::Mar , 8)));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithSCHEDULENoThrow) {
|
||||
DeckPtr deck(new Deck());
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
deck->addKeyword( DeckKeyword( "SCHEDULE" ) );
|
||||
|
||||
BOOST_CHECK_NO_THROW(Schedule schedule(ParseContext() , grid , deck ));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(EmptyScheduleHasNoWells) {
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
DeckPtr deck = createDeck();
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
BOOST_CHECK_EQUAL( 0U , schedule.numWells() );
|
||||
@@ -238,7 +238,7 @@ BOOST_AUTO_TEST_CASE(EmptyScheduleHasNoWells) {
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateSchedule_DeckWithoutGRUPTREE_HasRootGroupTreeNodeForTimeStepZero) {
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
DeckPtr deck = createDeck();
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
BOOST_CHECK_EQUAL("FIELD", schedule.getGroupTree(0)->getNode("FIELD")->name());
|
||||
@@ -263,7 +263,7 @@ static std::shared_ptr< Deck > deckWithGRUPTREE() {
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateSchedule_DeckWithGRUPTREE_HasRootGroupTreeNodeForTimeStepZero) {
|
||||
auto grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
auto deck = deckWithGRUPTREE();
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
GroupTreeNodePtr fieldNode = schedule.getGroupTree(0)->getNode("FIELD");
|
||||
@@ -274,7 +274,7 @@ BOOST_AUTO_TEST_CASE(CreateSchedule_DeckWithGRUPTREE_HasRootGroupTreeNodeForTime
|
||||
|
||||
BOOST_AUTO_TEST_CASE(GetGroups) {
|
||||
auto deck = deckWithGRUPTREE();
|
||||
auto grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
|
||||
auto groups = schedule.getGroups();
|
||||
@@ -291,7 +291,7 @@ BOOST_AUTO_TEST_CASE(GetGroups) {
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(EmptyScheduleHasFIELDGroup) {
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
DeckPtr deck = createDeck();
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
BOOST_CHECK_EQUAL( 1U , schedule.numGroups() );
|
||||
@@ -301,7 +301,7 @@ BOOST_AUTO_TEST_CASE(EmptyScheduleHasFIELDGroup) {
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellsIterator_Empty_EmptyVectorReturned) {
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
DeckPtr deck = createDeck();
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
size_t timeStep = 0;
|
||||
@@ -314,7 +314,7 @@ BOOST_AUTO_TEST_CASE(WellsIterator_Empty_EmptyVectorReturned) {
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellsIterator_HasWells_WellsReturned) {
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
DeckPtr deck = createDeckWithWells();
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
size_t timeStep = 0;
|
||||
@@ -328,7 +328,7 @@ BOOST_AUTO_TEST_CASE(WellsIterator_HasWells_WellsReturned) {
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellsIteratorWithRegex_HasWells_WellsReturned) {
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
DeckPtr deck = createDeckWithWells();
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
std::string wellNamePattern;
|
||||
@@ -347,7 +347,7 @@ BOOST_AUTO_TEST_CASE(WellsIteratorWithRegex_HasWells_WellsReturned) {
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(ReturnNumWellsTimestep) {
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
DeckPtr deck = createDeckWithWells();
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
|
||||
@@ -358,7 +358,7 @@ BOOST_AUTO_TEST_CASE(ReturnNumWellsTimestep) {
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(ReturnMaxNumCompletionsForWellsInTimestep) {
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
DeckPtr deck = createDeckWithWellsAndCompletionData();
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
|
||||
@@ -367,7 +367,7 @@ BOOST_AUTO_TEST_CASE(ReturnMaxNumCompletionsForWellsInTimestep) {
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(TestCrossFlowHandling) {
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
DeckPtr deck = createDeckForTestingCrossFlow();
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
|
||||
@@ -447,7 +447,7 @@ static DeckPtr createDeckWithWellsAndCompletionDataWithWELOPEN() {
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateScheduleDeckWellsAndCompletionDataWithWELOPEN) {
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
DeckPtr deck = createDeckWithWellsAndCompletionDataWithWELOPEN();
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
auto* well = schedule.getWell("OP_1");
|
||||
@@ -550,7 +550,7 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithWELOPEN_TryToOpenWellWithShutCompleti
|
||||
" 'OP_1' OPEN / \n "
|
||||
"/\n";
|
||||
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
ParseContext parseContext;
|
||||
DeckPtr deck = parser.parseString(input, parseContext);
|
||||
Schedule schedule(parseContext , grid , deck );
|
||||
@@ -593,7 +593,7 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithCOMPLUMPwithC1_ThrowsExcpetion) {
|
||||
|
||||
|
||||
DeckPtr deck = parser.parseString(input, ParseContext());
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 10 , 10 , 10 );
|
||||
EclipseGrid grid(10,10,10);
|
||||
BOOST_CHECK_THROW(Schedule schedule(ParseContext() , grid , deck ), std::exception);
|
||||
}
|
||||
|
||||
@@ -629,7 +629,7 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithCOMPLUMPwithC1andC2_ThrowsExcpetion)
|
||||
|
||||
|
||||
DeckPtr deck = parser.parseString(input, ParseContext());
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 10 , 10 , 10 );
|
||||
EclipseGrid grid(10,10,10);
|
||||
BOOST_CHECK_THROW(Schedule schedule(ParseContext() , grid , deck ), std::exception);
|
||||
}
|
||||
|
||||
@@ -665,7 +665,7 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithCOMPLUMPwithC2_ThrowsExcpetion) {
|
||||
|
||||
|
||||
DeckPtr deck = parser.parseString(input, ParseContext());
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 10 , 10 , 10 );
|
||||
EclipseGrid grid(10,10,10);
|
||||
BOOST_CHECK_THROW(Schedule schedule(ParseContext() , grid , deck ), std::exception);
|
||||
}
|
||||
|
||||
@@ -699,7 +699,7 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithCOMPLUMPwithDefaultValuesInWELOPEN) {
|
||||
" 10 NOV 2008 / \n"
|
||||
"/\n";
|
||||
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 10 , 10 , 10 );
|
||||
EclipseGrid grid(10,10,10);
|
||||
DeckPtr deck = parser.parseString(input, ParseContext());
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
auto* well = schedule.getWell("OP_1");
|
||||
@@ -745,7 +745,7 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithWRFT) {
|
||||
"/\n";
|
||||
|
||||
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 10 , 10 , 10 );
|
||||
EclipseGrid grid(10,10,10);
|
||||
ParseContext parseContext;
|
||||
DeckPtr deck = parser.parseString(input, parseContext);
|
||||
Schedule schedule(parseContext , grid , deck );
|
||||
@@ -811,7 +811,7 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithWRFTPLT) {
|
||||
" 10 NOV 2008 / \n"
|
||||
"/\n";
|
||||
ParseContext parseContext;
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 10 , 10 , 10 );
|
||||
EclipseGrid grid(10,10,10);
|
||||
DeckPtr deck = parser.parseString(input, parseContext);
|
||||
Schedule schedule(parseContext , grid , deck );
|
||||
auto* well = schedule.getWell("OP_1");
|
||||
@@ -859,7 +859,7 @@ BOOST_AUTO_TEST_CASE(createDeckWithWeltArg) {
|
||||
|
||||
ParseContext parseContext;
|
||||
DeckPtr deck = parser.parseString(input, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 10 , 10 , 10 );
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid , deck );
|
||||
auto* well = schedule.getWell("OP_1");
|
||||
|
||||
@@ -897,7 +897,7 @@ BOOST_AUTO_TEST_CASE(createDeckWithWeltArgException) {
|
||||
|
||||
ParseContext parseContext;
|
||||
DeckPtr deck = parser.parseString(input, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 10 , 10 , 10 );
|
||||
EclipseGrid grid(10,10,10);
|
||||
|
||||
BOOST_CHECK_THROW(Schedule (parseContext , grid , deck ), std::invalid_argument);
|
||||
}
|
||||
@@ -913,7 +913,7 @@ BOOST_AUTO_TEST_CASE(createDeckWithWeltArgException2) {
|
||||
|
||||
ParseContext parseContext;
|
||||
DeckPtr deck = parser.parseString(input, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 10 , 10 , 10 );
|
||||
EclipseGrid grid(10,10,10);
|
||||
|
||||
BOOST_CHECK_THROW(Schedule (parseContext , grid , deck ), std::out_of_range);
|
||||
}
|
||||
@@ -969,7 +969,7 @@ BOOST_AUTO_TEST_CASE(createDeckWithWPIMULT) {
|
||||
|
||||
ParseContext parseContext;
|
||||
DeckPtr deck = parser.parseString(input, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10, 10, 10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid, deck );
|
||||
auto* well = schedule.getWell("OP_1");
|
||||
|
||||
@@ -1017,7 +1017,7 @@ BOOST_AUTO_TEST_CASE(createDeckWithDRSDT) {
|
||||
|
||||
ParseContext parseContext;
|
||||
DeckPtr deck = parser.parseString(input, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10, 10, 10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid, deck );
|
||||
size_t currentStep = 1;
|
||||
BOOST_CHECK_EQUAL(schedule.hasOilVaporizationProperties(), true);
|
||||
@@ -1049,7 +1049,7 @@ BOOST_AUTO_TEST_CASE(createDeckWithDRSDTthenDRVDT) {
|
||||
|
||||
ParseContext parseContext;
|
||||
DeckPtr deck = parser.parseString(input, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10, 10, 10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid, deck );
|
||||
size_t currentStep = 2;
|
||||
BOOST_CHECK_EQUAL(schedule.hasOilVaporizationProperties(), true);
|
||||
@@ -1074,7 +1074,7 @@ BOOST_AUTO_TEST_CASE(createDeckWithVAPPARS) {
|
||||
|
||||
ParseContext parseContext;
|
||||
DeckPtr deck = parser.parseString(input, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10, 10, 10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid, deck );
|
||||
size_t currentStep = 1;
|
||||
BOOST_CHECK_EQUAL(schedule.hasOilVaporizationProperties(), true);
|
||||
@@ -1101,7 +1101,7 @@ BOOST_AUTO_TEST_CASE(createDeckWithOutOilVaporizationProperties) {
|
||||
|
||||
ParseContext parseContext;
|
||||
DeckPtr deck = parser.parseString(input, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10, 10, 10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid, deck );
|
||||
|
||||
BOOST_CHECK_EQUAL(schedule.hasOilVaporizationProperties(), false);
|
||||
@@ -1160,7 +1160,7 @@ BOOST_AUTO_TEST_CASE(changeBhpLimitInHistoryModeWithWeltarg) {
|
||||
|
||||
ParseContext parseContext;
|
||||
DeckPtr deck = parser.parseString(input, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10, 10, 10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(parseContext , grid, deck );
|
||||
auto* well_p = schedule.getWell("P");
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ static DeckPtr createDeck(const std::string& input) {
|
||||
BOOST_AUTO_TEST_CASE(TuningTest) {
|
||||
|
||||
DeckPtr deck = createDeck(deckStr);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 10 , 10 , 10 );
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule( ParseContext() , grid , deck );
|
||||
TuningPtr tuning = schedule.getTuning();
|
||||
|
||||
@@ -321,7 +321,7 @@ BOOST_AUTO_TEST_CASE(TuningTest) {
|
||||
BOOST_AUTO_TEST_CASE(TuningInitTest) {
|
||||
|
||||
DeckPtr deck = createDeck(deckStr);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 10 , 10 , 10 );
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext() , grid , deck);
|
||||
TuningPtr tuning = schedule.getTuning();
|
||||
|
||||
@@ -342,14 +342,14 @@ BOOST_AUTO_TEST_CASE(TuningInitTest) {
|
||||
BOOST_CHECK_EQUAL(true, TMAXWC_has_value);
|
||||
BOOST_CHECK_CLOSE(TMAXWC_default, 10.0 * Metric::Time, diff);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(TuningResetTest) {
|
||||
|
||||
DeckPtr deck = createDeck(deckStr);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 10 , 10 , 10 );
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext() , grid , deck);
|
||||
TuningPtr tuning = schedule.getTuning();
|
||||
|
||||
|
||||
@@ -139,14 +139,14 @@ static DeckPtr createDeckWithWaterInjector() {
|
||||
}
|
||||
BOOST_AUTO_TEST_CASE(TestNoSolvent) {
|
||||
DeckPtr deck = createDeckWithOutSolvent();
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
BOOST_CHECK(!deck->hasKeyword("WSOLVENT"));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(TestGasInjector) {
|
||||
DeckPtr deck = createDeckWithGasInjector();
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext(), grid , deck );
|
||||
BOOST_CHECK(deck->hasKeyword("WSOLVENT"));
|
||||
|
||||
@@ -154,7 +154,7 @@ BOOST_AUTO_TEST_CASE(TestGasInjector) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(TestDynamicWSOLVENT) {
|
||||
DeckPtr deck = createDeckWithDynamicWSOLVENT();
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
BOOST_CHECK(deck->hasKeyword("WSOLVENT"));
|
||||
const auto& keyword = deck->getKeyword("WSOLVENT");
|
||||
@@ -171,12 +171,12 @@ BOOST_AUTO_TEST_CASE(TestDynamicWSOLVENT) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(TestOilInjector) {
|
||||
DeckPtr deck = createDeckWithOilInjector();
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
BOOST_CHECK_THROW (Schedule(ParseContext() , grid , deck ), std::invalid_argument);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(TestWaterInjector) {
|
||||
DeckPtr deck = createDeckWithWaterInjector();
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
EclipseGrid grid(10,10,10);
|
||||
BOOST_CHECK_THROW (Schedule(ParseContext(), grid , deck ), std::invalid_argument);
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ BOOST_AUTO_TEST_CASE(WellCOMPDATtestTRACK) {
|
||||
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::DeckPtr deck = parser.parseString(input, parseContext);
|
||||
std::shared_ptr<const Opm::EclipseGrid> grid = std::make_shared<const Opm::EclipseGrid>( 10 , 10 , 10 );
|
||||
Opm::EclipseGrid grid(10,10,10);
|
||||
Opm::Schedule schedule(Opm::ParseContext() , grid , deck );
|
||||
auto* op_1 = schedule.getWell("OP_1");
|
||||
|
||||
@@ -229,7 +229,7 @@ BOOST_AUTO_TEST_CASE(WellCOMPDATtestDefaultTRACK) {
|
||||
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::DeckPtr deck = parser.parseString(input, parseContext);
|
||||
std::shared_ptr<const Opm::EclipseGrid> grid = std::make_shared<const Opm::EclipseGrid>( 10 , 10 , 10 );
|
||||
Opm::EclipseGrid grid(10,10,10);
|
||||
Opm::Schedule schedule(Opm::ParseContext() , grid , deck );
|
||||
auto* op_1 = schedule.getWell("OP_1");
|
||||
|
||||
@@ -272,7 +272,7 @@ BOOST_AUTO_TEST_CASE(WellCOMPDATtestINPUT) {
|
||||
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::DeckPtr deck = parser.parseString(input, parseContext);
|
||||
std::shared_ptr<const Opm::EclipseGrid> grid = std::make_shared<const Opm::EclipseGrid>( 10 , 10 , 10 );
|
||||
Opm::EclipseGrid grid(10,10,10);
|
||||
Opm::Schedule schedule(Opm::ParseContext() , grid , deck );
|
||||
auto* op_1 = schedule.getWell("OP_1");
|
||||
|
||||
|
||||
@@ -37,12 +37,12 @@ BOOST_AUTO_TEST_CASE( CreateCompletionsFromKeyword ) {
|
||||
ParserPtr parser(new Parser());
|
||||
const auto scheduleFile = "testdata/integration_tests/SCHEDULE/SCHEDULE_COMPDAT1";
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, ParseContext());
|
||||
const auto grid = std::make_shared< const EclipseGrid >( *deck );
|
||||
EclipseGrid grid(10,10,10);
|
||||
const Schedule schedule( ParseContext(), grid, *deck );
|
||||
const auto& COMPDAT1 = deck->getKeyword("COMPDAT" , 1);
|
||||
|
||||
const auto wells = schedule.getWells( 0 );
|
||||
auto completions = Completion::fromCOMPDAT( *grid, COMPDAT1, wells );
|
||||
auto completions = Completion::fromCOMPDAT( grid, COMPDAT1, wells );
|
||||
BOOST_CHECK_EQUAL( 3U , completions.size() );
|
||||
|
||||
BOOST_CHECK( completions.find("W_1") != completions.end() );
|
||||
|
||||
@@ -42,7 +42,7 @@ BOOST_AUTO_TEST_CASE( parse_WCONPROD_OK ) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string wconprodFile("testdata/integration_tests/WellWithWildcards/WCONPROD1");
|
||||
DeckPtr deck = parser->parseFile(wconprodFile, ParseContext());
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 30,30,30);
|
||||
EclipseGrid grid(30,30,30);
|
||||
SchedulePtr sched(new Schedule(ParseContext() , grid , deck ));
|
||||
|
||||
BOOST_CHECK_EQUAL(5U, sched->numWells());
|
||||
@@ -77,7 +77,7 @@ BOOST_AUTO_TEST_CASE( parse_WCONINJE_OK ) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string wconprodFile("testdata/integration_tests/WellWithWildcards/WCONINJE1");
|
||||
DeckPtr deck = parser->parseFile(wconprodFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 30,30,30 );
|
||||
EclipseGrid grid(30,30,30);
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck ));
|
||||
|
||||
BOOST_CHECK_EQUAL(5U, sched->numWells());
|
||||
|
||||
@@ -46,7 +46,7 @@ BOOST_AUTO_TEST_CASE(CreateSchedule) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE1");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
EclipseGrid grid(10,10,10);
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck ));
|
||||
TimeMapConstPtr timeMap = sched->getTimeMap();
|
||||
BOOST_CHECK_EQUAL(boost::posix_time::ptime(boost::gregorian::date(2007, boost::gregorian::May, 10)), sched->getStartTime());
|
||||
@@ -60,7 +60,7 @@ BOOST_AUTO_TEST_CASE(CreateSchedule_Comments_After_Keywords) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_COMMENTS_AFTER_KEYWORDS");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
EclipseGrid grid(10,10,10);
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck ));
|
||||
TimeMapConstPtr timeMap = sched->getTimeMap();
|
||||
BOOST_CHECK_EQUAL(boost::posix_time::ptime(boost::gregorian::date(2007, boost::gregorian::May, 10)), sched->getStartTime());
|
||||
@@ -73,7 +73,7 @@ BOOST_AUTO_TEST_CASE(WCONPROD_MissingCmode) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_MISSING_CMODE");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
EclipseGrid grid(10,10,3);
|
||||
BOOST_CHECK_NO_THROW( new Schedule(parseContext , grid , deck ) );
|
||||
}
|
||||
|
||||
@@ -83,7 +83,8 @@ BOOST_AUTO_TEST_CASE(WCONPROD_Missing_DATA) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_CMODE_MISSING_DATA");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
EclipseGrid grid(10,10,3);
|
||||
|
||||
BOOST_CHECK_THROW( new Schedule(parseContext , grid , deck ) , std::invalid_argument );
|
||||
}
|
||||
|
||||
@@ -93,7 +94,7 @@ BOOST_AUTO_TEST_CASE(WellTestRefDepth) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(40,60,30);
|
||||
EclipseGrid grid(40,60,30);
|
||||
BOOST_CHECK_EQUAL(3, 3);
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck ));
|
||||
BOOST_CHECK_EQUAL(4, 4);
|
||||
@@ -101,7 +102,7 @@ BOOST_AUTO_TEST_CASE(WellTestRefDepth) {
|
||||
auto* well1 = sched->getWell("W_1");
|
||||
auto* well2 = sched->getWell("W_2");
|
||||
auto* well4 = sched->getWell("W_4");
|
||||
BOOST_CHECK_EQUAL( well1->getRefDepth() , grid->getCellDepth( 29 , 36 , 0 ));
|
||||
BOOST_CHECK_EQUAL( well1->getRefDepth() , grid.getCellDepth( 29 , 36 , 0 ));
|
||||
BOOST_CHECK_EQUAL( well2->getRefDepth() , 100 );
|
||||
BOOST_CHECK_THROW( well4->getRefDepth() , std::invalid_argument );
|
||||
}
|
||||
@@ -112,7 +113,7 @@ BOOST_AUTO_TEST_CASE(WellTestOpen) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(40,60,30);
|
||||
EclipseGrid grid(40,60,30);
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck ));
|
||||
|
||||
auto well1 = sched->getWell( "W_1" );
|
||||
@@ -152,7 +153,7 @@ BOOST_AUTO_TEST_CASE(WellTesting) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(40,60,30);
|
||||
EclipseGrid grid(40,60,30);
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck ));
|
||||
|
||||
BOOST_CHECK_EQUAL(4U, sched->numWells());
|
||||
@@ -268,7 +269,7 @@ BOOST_AUTO_TEST_CASE(WellTestCOMPDAT_DEFAULTED_ITEMS) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_COMPDAT1");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(40,60,30);
|
||||
EclipseGrid grid(40,60,30);
|
||||
SchedulePtr sched(new Schedule(parseContext , grid, deck));
|
||||
}
|
||||
|
||||
@@ -278,7 +279,7 @@ BOOST_AUTO_TEST_CASE(WellTestCOMPDAT) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(40,60,30);
|
||||
EclipseGrid grid(40,60,30);
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck));
|
||||
|
||||
BOOST_CHECK_EQUAL(4U, sched->numWells());
|
||||
@@ -310,7 +311,7 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_with_explicit_L0_parenting) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_GRUPTREE_EXPLICIT_PARENTING");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
EclipseGrid grid(10,10,3);
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck));
|
||||
|
||||
GroupTreeNodePtr rootNode = sched->getGroupTree(0)->getNode("FIELD");
|
||||
@@ -339,7 +340,7 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_correct) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GRUPTREE");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
EclipseGrid grid(10,10,3);
|
||||
SchedulePtr schedule(new Schedule(parseContext , grid , deck));
|
||||
|
||||
BOOST_CHECK( schedule->hasGroup( "FIELD" ));
|
||||
@@ -358,7 +359,7 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_WELSPECS_AND_GRUPTREE_correct_iter_function)
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GROUPS");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
EclipseGrid grid(10,10,3);
|
||||
SchedulePtr schedule(new Schedule(parseContext , grid , deck));
|
||||
|
||||
// Time 0, only from WELSPECS
|
||||
@@ -385,7 +386,7 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_WELSPECS_AND_GRUPTREE_correct_tree) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GROUPS");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
EclipseGrid grid(10,10,3);
|
||||
SchedulePtr schedule(new Schedule(parseContext , grid , deck));
|
||||
|
||||
// Time 0, only from WELSPECS
|
||||
@@ -430,7 +431,7 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_WITH_REPARENT_correct_tree) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_GROUPS_REPARENT");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
EclipseGrid grid(10,10,3);
|
||||
SchedulePtr schedule(new Schedule(parseContext , grid , deck));
|
||||
|
||||
|
||||
@@ -463,7 +464,7 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_PrintGrouptree) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GROUPS");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
EclipseGrid grid(10,10,3);
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck));
|
||||
|
||||
GroupTreePtr rootNode = sched->getGroupTree(0);
|
||||
@@ -477,7 +478,7 @@ BOOST_AUTO_TEST_CASE( WellTestGroups ) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_GROUPS");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
EclipseGrid grid(10,10,3);
|
||||
SchedulePtr sched( new Schedule(parseContext , grid , deck));
|
||||
|
||||
BOOST_CHECK_EQUAL( 3U , sched->numGroups() );
|
||||
@@ -519,7 +520,7 @@ BOOST_AUTO_TEST_CASE( WellTestGroupAndWellRelation ) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS_AND_GROUPS");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
EclipseGrid grid(10,10,3);
|
||||
SchedulePtr sched( new Schedule(parseContext , grid , deck));
|
||||
|
||||
auto* group1 = sched->getGroup("GROUP1");
|
||||
@@ -548,7 +549,7 @@ BOOST_AUTO_TEST_CASE(WellTestWELSPECSDataLoaded) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(40,60,30);
|
||||
EclipseGrid grid(40,60,30);
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck));
|
||||
|
||||
BOOST_CHECK_EQUAL(4U, sched->numWells());
|
||||
@@ -581,7 +582,7 @@ BOOST_AUTO_TEST_CASE(WellTestWELSPECS_InvalidConfig_Throws) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELL_INVALID_WELSPECS");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
EclipseGrid grid(10,10,3);
|
||||
BOOST_CHECK_THROW(new Schedule(parseContext , grid , deck), std::invalid_argument);
|
||||
|
||||
}
|
||||
@@ -620,7 +621,7 @@ BOOST_AUTO_TEST_CASE(WellTestWGRUPCONWellPropertiesSet) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WGRUPCON");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 10,10,10 );
|
||||
EclipseGrid grid(10,10,10);
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck));
|
||||
|
||||
const auto* well1 = sched->getWell("W_1");
|
||||
@@ -659,7 +660,7 @@ COMPDAT \n\
|
||||
'W1' 2* 1 1 'OPEN' 1* 32.948 0.311 3047.839 2* 'X' 22.100 /\n\
|
||||
/\n";
|
||||
DeckPtr deck = parser->parseString(deckString, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 30,30,10 );
|
||||
EclipseGrid grid(30,30,10);
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck));
|
||||
const auto* well = sched->getWell("W1");
|
||||
CompletionSetConstPtr completions = well->getCompletions(0);
|
||||
@@ -677,7 +678,7 @@ BOOST_AUTO_TEST_CASE(OpmCode) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/wells_group.data");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,3);
|
||||
EclipseGrid grid(10,10,3);
|
||||
BOOST_CHECK_NO_THROW( new Schedule(parseContext , grid , deck) );
|
||||
}
|
||||
|
||||
@@ -688,7 +689,7 @@ BOOST_AUTO_TEST_CASE(WELLS_SHUT) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_SHUT_WELL");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 20,40,1 );
|
||||
EclipseGrid grid(20,40,1);
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck));
|
||||
|
||||
|
||||
@@ -712,7 +713,7 @@ BOOST_AUTO_TEST_CASE(WellTestWPOLYMER) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_POLYMER");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 30,30,30);
|
||||
EclipseGrid grid(30,30,30);
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck));
|
||||
|
||||
|
||||
@@ -760,7 +761,7 @@ BOOST_AUTO_TEST_CASE(WellTestWECON) {
|
||||
ParserPtr parser(new Parser());
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WECON");
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 30,30,30);
|
||||
EclipseGrid grid(30,30,30);
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck));
|
||||
|
||||
BOOST_CHECK_EQUAL(3U, sched->numWells());
|
||||
@@ -870,7 +871,7 @@ BOOST_AUTO_TEST_CASE(TestEvents) {
|
||||
std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_EVENTS");
|
||||
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(40,40,30);
|
||||
EclipseGrid grid(40,40,30);
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck));
|
||||
const Events& events = sched->getEvents();
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ BOOST_AUTO_TEST_CASE( CheckUnsupportedInSCHEDULE ) {
|
||||
|
||||
auto deckSupported = parser.parseString( deckStringSupported , parseContext );
|
||||
auto deckUnSupported = parser.parseString( deckStringUnSupported , parseContext );
|
||||
std::shared_ptr<EclipseGrid> grid = std::make_shared<EclipseGrid>( deckSupported );
|
||||
EclipseGrid grid( deckSupported );
|
||||
|
||||
parseContext.update( ParseContext::UNSUPPORTED_SCHEDULE_GEO_MODIFIER , InputError::IGNORE );
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deckSupported ));
|
||||
@@ -262,7 +262,7 @@ BOOST_AUTO_TEST_CASE(TestCOMPORD) {
|
||||
Parser parser(true);
|
||||
auto deck = parser.parseString( deckString , parseContext );
|
||||
|
||||
std::shared_ptr<EclipseGrid> grid = std::make_shared<EclipseGrid>( deck );
|
||||
EclipseGrid grid( deck );
|
||||
|
||||
parseContext.update( ParseContext::UNSUPPORTED_COMPORD_TYPE , InputError::IGNORE);
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deck ));
|
||||
|
||||
Reference in New Issue
Block a user