Remove IOConfig use in Schedule
This commit is contained in:
parent
58d206f3b0
commit
744d2ee773
@ -35,7 +35,6 @@
|
||||
#include <opm/parser/eclipse/Parser/ParserKeywords/W.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/CompletionSet.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/DynamicState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/DynamicVector.hpp>
|
||||
@ -73,15 +72,13 @@ namespace Opm {
|
||||
|
||||
Schedule::Schedule(const ParseContext& parseContext,
|
||||
std::shared_ptr<const EclipseGrid> grid,
|
||||
std::shared_ptr< const Deck > deckptr,
|
||||
std::shared_ptr< IOConfig > ) :
|
||||
std::shared_ptr< const Deck > deckptr ) :
|
||||
Schedule(parseContext, grid, *deckptr )
|
||||
{}
|
||||
|
||||
Schedule::Schedule( const ParseContext& parseContext,
|
||||
std::shared_ptr<const EclipseGrid> grid,
|
||||
const Deck& deck,
|
||||
std::shared_ptr< IOConfig > ioConfig ) :
|
||||
const Deck& deck ) :
|
||||
m_timeMap( createTimeMap( deck ) ),
|
||||
m_grid( grid )
|
||||
{
|
||||
@ -95,7 +92,7 @@ namespace Opm {
|
||||
|
||||
if (Section::hasSCHEDULE(deck)) {
|
||||
std::shared_ptr<SCHEDULESection> scheduleSection = std::make_shared<SCHEDULESection>(deck);
|
||||
iterateScheduleSection(parseContext , *scheduleSection , ioConfig);
|
||||
iterateScheduleSection(parseContext , *scheduleSection );
|
||||
}
|
||||
}
|
||||
|
||||
@ -124,7 +121,7 @@ namespace Opm {
|
||||
}
|
||||
}
|
||||
|
||||
void Schedule::iterateScheduleSection(const ParseContext& parseContext , const SCHEDULESection& section, IOConfigPtr ) {
|
||||
void Schedule::iterateScheduleSection(const ParseContext& parseContext , const SCHEDULESection& section ) {
|
||||
/*
|
||||
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
|
||||
|
@ -41,7 +41,6 @@ namespace Opm
|
||||
class Events;
|
||||
class Group;
|
||||
class GroupTree;
|
||||
class IOConfig;
|
||||
class OilVaporizationProperties;
|
||||
class ParseContext;
|
||||
class SCHEDULESection;
|
||||
@ -53,10 +52,10 @@ namespace Opm
|
||||
class Schedule {
|
||||
public:
|
||||
Schedule(const ParseContext& parseContext, std::shared_ptr<const EclipseGrid> grid,
|
||||
const Deck& deck, std::shared_ptr<IOConfig> ioConfig = nullptr );
|
||||
const Deck& deck );
|
||||
/// [deprecated]
|
||||
Schedule(const ParseContext& parseContext, std::shared_ptr<const EclipseGrid> grid,
|
||||
std::shared_ptr<const Deck> deck, std::shared_ptr<IOConfig> ioConfig = nullptr );
|
||||
std::shared_ptr<const Deck> deck );
|
||||
|
||||
/*
|
||||
* If the input deck does not specify a start time, Eclipse's 1. Jan
|
||||
@ -113,7 +112,7 @@ namespace Opm
|
||||
void initializeNOSIM(const Deck& deck);
|
||||
void initRootGroupTreeNode(std::shared_ptr< const TimeMap > timeMap);
|
||||
void initOilVaporization(std::shared_ptr< const TimeMap > timeMap);
|
||||
void iterateScheduleSection(const ParseContext& parseContext , const SCHEDULESection& section, std::shared_ptr< IOConfig > ioConfig);
|
||||
void iterateScheduleSection(const ParseContext& parseContext , const SCHEDULESection& );
|
||||
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);
|
||||
|
@ -36,7 +36,6 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Events.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
||||
|
||||
using namespace Opm;
|
||||
|
||||
@ -66,11 +65,10 @@ BOOST_AUTO_TEST_CASE( CheckUnsoppertedInSCHEDULE ) {
|
||||
|
||||
auto deck = parser.parseString( deckString , parseContext );
|
||||
std::shared_ptr<EclipseGrid> grid = std::make_shared<EclipseGrid>( deck );
|
||||
std::shared_ptr<IOConfig> ioconfig = std::make_shared<IOConfig>();
|
||||
|
||||
parseContext.update( ParseContext::UNSUPPORTED_SCHEDULE_GEO_MODIFIER , InputError::IGNORE );
|
||||
{
|
||||
Schedule schedule( parseContext , grid , deck , ioconfig );
|
||||
Schedule schedule( parseContext , grid , deck );
|
||||
auto events = schedule.getEvents( );
|
||||
BOOST_CHECK_EQUAL( false , events.hasEvent( ScheduleEvents::GEO_MODIFIER , 1 ));
|
||||
BOOST_CHECK_EQUAL( true , events.hasEvent( ScheduleEvents::GEO_MODIFIER , 2 ));
|
||||
|
@ -37,7 +37,6 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/WellSet.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Group.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
||||
|
||||
static Opm::TimeMapPtr createXDaysTimeMap(size_t numDays) {
|
||||
boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1);
|
||||
@ -287,8 +286,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);
|
||||
Opm::IOConfigPtr ioConfig;
|
||||
Opm::Schedule schedule(parseContext , grid, deck, ioConfig);
|
||||
Opm::Schedule schedule(parseContext , grid, deck );
|
||||
|
||||
Opm::GroupConstPtr group1 = schedule.getGroup("PRODUC");
|
||||
BOOST_CHECK_EQUAL(group1->getGroupEfficiencyFactor(0), 0.85);
|
||||
@ -335,8 +333,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);
|
||||
Opm::IOConfigPtr ioConfig;
|
||||
Opm::Schedule schedule(parseContext , grid, deck, ioConfig);
|
||||
Opm::Schedule schedule(parseContext , grid, deck );
|
||||
Opm::WellConstPtr currentWell = schedule.getWell("B-37T2");
|
||||
const Opm::WellProductionProperties& wellProductionProperties = currentWell->getProductionProperties(0);
|
||||
BOOST_CHECK_EQUAL(wellProductionProperties.controlMode, Opm::WellProducer::ControlModeEnum::GRUP);
|
||||
|
@ -39,7 +39,6 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/Units/Dimension.hpp>
|
||||
@ -201,16 +200,14 @@ 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);
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(ParseContext() , grid , deck, ioConfig);
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(ParseContext() , grid , deck, ioConfig);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
std::vector<WellConstPtr> wells = schedule.getWells();
|
||||
|
||||
BOOST_CHECK_EQUAL( "CW_1" , wells[0]->name());
|
||||
@ -221,8 +218,7 @@ 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);
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(ParseContext() , grid , deck, ioConfig);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
BOOST_CHECK_EQUAL( schedule.getStartTime() , boost::posix_time::ptime(boost::gregorian::date( 1998 , boost::gregorian::Mar , 8)));
|
||||
}
|
||||
|
||||
@ -231,15 +227,13 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithSCHEDULENoThrow) {
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
deck->addKeyword( DeckKeyword( "SCHEDULE" ) );
|
||||
|
||||
IOConfigPtr ioConfig;
|
||||
BOOST_CHECK_NO_THROW(Schedule schedule(ParseContext() , grid , deck, ioConfig));
|
||||
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);
|
||||
DeckPtr deck = createDeck();
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(ParseContext() , grid , deck, ioConfig);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
BOOST_CHECK_EQUAL( 0U , schedule.numWells() );
|
||||
BOOST_CHECK_EQUAL( false , schedule.hasWell("WELL1") );
|
||||
BOOST_CHECK_THROW( schedule.getWell("WELL2") , std::invalid_argument );
|
||||
@ -248,8 +242,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);
|
||||
DeckPtr deck = createDeck();
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(ParseContext() , grid , deck, ioConfig);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
BOOST_CHECK_EQUAL("FIELD", schedule.getGroupTree(0)->getNode("FIELD")->name());
|
||||
}
|
||||
|
||||
@ -274,8 +267,7 @@ static std::shared_ptr< Deck > deckWithGRUPTREE() {
|
||||
BOOST_AUTO_TEST_CASE(CreateSchedule_DeckWithGRUPTREE_HasRootGroupTreeNodeForTimeStepZero) {
|
||||
auto grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
auto deck = deckWithGRUPTREE();
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(ParseContext() , grid , deck, ioConfig);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
GroupTreeNodePtr fieldNode = schedule.getGroupTree(0)->getNode("FIELD");
|
||||
BOOST_CHECK_EQUAL("FIELD", fieldNode->name());
|
||||
GroupTreeNodePtr FAREN = fieldNode->getChildGroup("FAREN");
|
||||
@ -285,8 +277,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);
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(ParseContext() , grid , deck, ioConfig);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
|
||||
auto groups = schedule.getGroups();
|
||||
|
||||
@ -304,8 +295,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);
|
||||
DeckPtr deck = createDeck();
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(ParseContext() , grid , deck, ioConfig);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
BOOST_CHECK_EQUAL( 1U , schedule.numGroups() );
|
||||
BOOST_CHECK_EQUAL( true , schedule.hasGroup("FIELD") );
|
||||
BOOST_CHECK_EQUAL( false , schedule.hasGroup("GROUP") );
|
||||
@ -315,8 +305,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);
|
||||
DeckPtr deck = createDeck();
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(ParseContext() , grid , deck, ioConfig);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
size_t timeStep = 0;
|
||||
std::vector<WellConstPtr> wells_alltimesteps = schedule.getWells();
|
||||
BOOST_CHECK_EQUAL(0U, wells_alltimesteps.size());
|
||||
@ -329,8 +318,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);
|
||||
DeckPtr deck = createDeckWithWells();
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(ParseContext() , grid , deck, ioConfig);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
size_t timeStep = 0;
|
||||
|
||||
std::vector<WellConstPtr> wells_alltimesteps = schedule.getWells();
|
||||
@ -344,8 +332,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);
|
||||
DeckPtr deck = createDeckWithWells();
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(ParseContext() , grid , deck, ioConfig);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
std::string wellNamePattern;
|
||||
std::vector<WellPtr> wells;
|
||||
|
||||
@ -365,8 +352,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);
|
||||
DeckPtr deck = createDeckWithWells();
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(ParseContext() , grid , deck, ioConfig);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
|
||||
BOOST_CHECK_EQUAL(schedule.numWells(0), 1);
|
||||
BOOST_CHECK_EQUAL(schedule.numWells(1), 1);
|
||||
@ -377,8 +363,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);
|
||||
DeckPtr deck = createDeckWithWellsAndCompletionData();
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(ParseContext() , grid , deck, ioConfig);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
|
||||
BOOST_CHECK_EQUAL(schedule.getMaxNumCompletionsForWells(1), 7);
|
||||
BOOST_CHECK_EQUAL(schedule.getMaxNumCompletionsForWells(3), 9);
|
||||
@ -387,8 +372,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);
|
||||
DeckPtr deck = createDeckForTestingCrossFlow();
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(ParseContext() , grid , deck, ioConfig);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
|
||||
WellPtr well_ban = schedule.getWell("BAN");
|
||||
BOOST_CHECK_EQUAL(well_ban->getAllowCrossFlow(), false);
|
||||
@ -468,8 +452,7 @@ static DeckPtr createDeckWithWellsAndCompletionDataWithWELOPEN() {
|
||||
BOOST_AUTO_TEST_CASE(CreateScheduleDeckWellsAndCompletionDataWithWELOPEN) {
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
DeckPtr deck = createDeckWithWellsAndCompletionDataWithWELOPEN();
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(ParseContext() , grid , deck, ioConfig);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
WellPtr well;
|
||||
well = schedule.getWell("OP_1");
|
||||
size_t currentStep = 0;
|
||||
@ -574,8 +557,7 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithWELOPEN_TryToOpenWellWithShutCompleti
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(10,10,10);
|
||||
ParseContext parseContext;
|
||||
DeckPtr deck = parser.parseString(input, parseContext);
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(parseContext , grid , deck, ioConfig);
|
||||
Schedule schedule(parseContext , grid , deck );
|
||||
WellPtr well;
|
||||
well = schedule.getWell("OP_1");
|
||||
size_t currentStep = 3;
|
||||
@ -617,8 +599,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 );
|
||||
IOConfigPtr ioConfig;
|
||||
BOOST_CHECK_THROW(Schedule schedule(ParseContext() , grid , deck, ioConfig), std::exception);
|
||||
BOOST_CHECK_THROW(Schedule schedule(ParseContext() , grid , deck ), std::exception);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithCOMPLUMPwithC1andC2_ThrowsExcpetion) {
|
||||
@ -654,8 +635,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 );
|
||||
IOConfigPtr ioConfig;
|
||||
BOOST_CHECK_THROW(Schedule schedule(ParseContext() , grid , deck, ioConfig), std::exception);
|
||||
BOOST_CHECK_THROW(Schedule schedule(ParseContext() , grid , deck ), std::exception);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithCOMPLUMPwithC2_ThrowsExcpetion) {
|
||||
@ -691,8 +671,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 );
|
||||
IOConfigPtr ioConfig;
|
||||
BOOST_CHECK_THROW(Schedule schedule(ParseContext() , grid , deck, ioConfig), std::exception);
|
||||
BOOST_CHECK_THROW(Schedule schedule(ParseContext() , grid , deck ), std::exception);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithCOMPLUMPwithDefaultValuesInWELOPEN) {
|
||||
@ -727,8 +706,7 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithCOMPLUMPwithDefaultValuesInWELOPEN) {
|
||||
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 10 , 10 , 10 );
|
||||
DeckPtr deck = parser.parseString(input, ParseContext());
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(ParseContext() , grid , deck, ioConfig);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
WellPtr well;
|
||||
well = schedule.getWell("OP_1");
|
||||
size_t currentStep = 3;
|
||||
@ -776,8 +754,7 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithWRFT) {
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 10 , 10 , 10 );
|
||||
ParseContext parseContext;
|
||||
DeckPtr deck = parser.parseString(input, parseContext);
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(parseContext , grid , deck, ioConfig);
|
||||
Schedule schedule(parseContext , grid , deck );
|
||||
|
||||
{
|
||||
WellPtr well;
|
||||
@ -844,8 +821,7 @@ BOOST_AUTO_TEST_CASE(CreateScheduleDeckWithWRFTPLT) {
|
||||
ParseContext parseContext;
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 10 , 10 , 10 );
|
||||
DeckPtr deck = parser.parseString(input, parseContext);
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(parseContext , grid , deck, ioConfig);
|
||||
Schedule schedule(parseContext , grid , deck );
|
||||
WellPtr well;
|
||||
well = schedule.getWell("OP_1");
|
||||
|
||||
@ -893,8 +869,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 );
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(parseContext , grid , deck, ioConfig);
|
||||
Schedule schedule(parseContext , grid , deck );
|
||||
WellPtr well = schedule.getWell("OP_1");
|
||||
|
||||
size_t currentStep = 1;
|
||||
@ -932,9 +907,8 @@ 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 );
|
||||
IOConfigPtr ioConfig;
|
||||
|
||||
BOOST_CHECK_THROW(Schedule (parseContext , grid , deck, ioConfig), std::invalid_argument);
|
||||
BOOST_CHECK_THROW(Schedule (parseContext , grid , deck ), std::invalid_argument);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(createDeckWithWeltArgException2) {
|
||||
@ -949,9 +923,8 @@ 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 );
|
||||
IOConfigPtr ioConfig;
|
||||
|
||||
BOOST_CHECK_THROW(Schedule (parseContext , grid , deck, ioConfig), std::out_of_range);
|
||||
BOOST_CHECK_THROW(Schedule (parseContext , grid , deck ), std::out_of_range);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(createDeckWithWPIMULT) {
|
||||
@ -1006,8 +979,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);
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(parseContext , grid, deck, ioConfig);
|
||||
Schedule schedule(parseContext , grid, deck );
|
||||
WellPtr well = schedule.getWell("OP_1");
|
||||
|
||||
size_t currentStep = 2;
|
||||
@ -1055,8 +1027,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);
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(parseContext , grid, deck, ioConfig);
|
||||
Schedule schedule(parseContext , grid, deck );
|
||||
size_t currentStep = 1;
|
||||
BOOST_CHECK_EQUAL(schedule.hasOilVaporizationProperties(), true);
|
||||
OilVaporizationPropertiesConstPtr ovap = schedule.getOilVaporizationProperties(currentStep);
|
||||
@ -1088,8 +1059,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);
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(parseContext , grid, deck, ioConfig);
|
||||
Schedule schedule(parseContext , grid, deck );
|
||||
size_t currentStep = 2;
|
||||
BOOST_CHECK_EQUAL(schedule.hasOilVaporizationProperties(), true);
|
||||
OilVaporizationPropertiesConstPtr ovap = schedule.getOilVaporizationProperties(currentStep);
|
||||
@ -1114,8 +1084,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);
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(parseContext , grid, deck, ioConfig);
|
||||
Schedule schedule(parseContext , grid, deck );
|
||||
size_t currentStep = 1;
|
||||
BOOST_CHECK_EQUAL(schedule.hasOilVaporizationProperties(), true);
|
||||
OilVaporizationPropertiesConstPtr ovap = schedule.getOilVaporizationProperties(currentStep);
|
||||
@ -1142,8 +1111,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);
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(parseContext , grid, deck, ioConfig);
|
||||
Schedule schedule(parseContext , grid, deck );
|
||||
|
||||
BOOST_CHECK_EQUAL(schedule.hasOilVaporizationProperties(), false);
|
||||
|
||||
@ -1202,8 +1170,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);
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(parseContext , grid, deck, ioConfig);
|
||||
Schedule schedule(parseContext , grid, deck );
|
||||
WellPtr well_p = schedule.getWell("P");
|
||||
|
||||
BOOST_CHECK_EQUAL(well_p->getProductionProperties(0).BHPLimit, 0); //start
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Tuning.hpp>
|
||||
#include <opm/parser/eclipse/Units/ConversionFactors.hpp>
|
||||
@ -72,8 +71,7 @@ BOOST_AUTO_TEST_CASE(TuningTest) {
|
||||
|
||||
DeckPtr deck = createDeck(deckStr);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 10 , 10 , 10 );
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(ParseContext() , grid , deck, ioConfig);
|
||||
Schedule schedule( ParseContext() , grid , deck );
|
||||
TuningPtr tuning = schedule.getTuning();
|
||||
|
||||
|
||||
@ -324,8 +322,7 @@ BOOST_AUTO_TEST_CASE(TuningInitTest) {
|
||||
|
||||
DeckPtr deck = createDeck(deckStr);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 10 , 10 , 10 );
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(ParseContext() , grid , deck, ioConfig);
|
||||
Schedule schedule(ParseContext() , grid , deck);
|
||||
TuningPtr tuning = schedule.getTuning();
|
||||
|
||||
|
||||
@ -353,8 +350,7 @@ BOOST_AUTO_TEST_CASE(TuningResetTest) {
|
||||
|
||||
DeckPtr deck = createDeck(deckStr);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 10 , 10 , 10 );
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(ParseContext() , grid , deck, ioConfig);
|
||||
Schedule schedule(ParseContext() , grid , deck);
|
||||
TuningPtr tuning = schedule.getTuning();
|
||||
|
||||
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <opm/common/utility/platform_dependent/reenable_warnings.h>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well.hpp>
|
||||
@ -143,16 +142,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);
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(ParseContext() , grid , deck, ioConfig);
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(ParseContext(), grid , deck, ioConfig );
|
||||
Schedule schedule(ParseContext(), grid , deck );
|
||||
BOOST_CHECK(deck->hasKeyword("WSOLVENT"));
|
||||
|
||||
}
|
||||
@ -160,8 +157,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);
|
||||
IOConfigPtr ioConfig;
|
||||
Schedule schedule(ParseContext() , grid , deck, ioConfig);
|
||||
Schedule schedule(ParseContext() , grid , deck );
|
||||
BOOST_CHECK(deck->hasKeyword("WSOLVENT"));
|
||||
const auto& keyword = deck->getKeyword("WSOLVENT");
|
||||
BOOST_CHECK_EQUAL(keyword.size(),1);
|
||||
@ -178,13 +174,11 @@ 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);
|
||||
IOConfigPtr ioConfig;
|
||||
BOOST_CHECK_THROW (Schedule(ParseContext() , grid , deck, ioConfig), std::invalid_argument);
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
BOOST_CHECK_THROW (Schedule(ParseContext(), grid , deck, ioConfig), std::invalid_argument);
|
||||
BOOST_CHECK_THROW (Schedule(ParseContext(), grid , deck ), std::invalid_argument);
|
||||
}
|
||||
|
@ -31,7 +31,6 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/CompletionSet.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
@ -199,8 +198,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::IOConfigPtr ioConfig;
|
||||
Opm::Schedule schedule(Opm::ParseContext() , grid , deck, ioConfig);
|
||||
Opm::Schedule schedule(Opm::ParseContext() , grid , deck );
|
||||
Opm::WellPtr op_1 = schedule.getWell("OP_1");
|
||||
|
||||
size_t timestep = 2;
|
||||
@ -241,8 +239,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::IOConfigPtr ioConfig;
|
||||
Opm::Schedule schedule(Opm::ParseContext() , grid , deck, ioConfig);
|
||||
Opm::Schedule schedule(Opm::ParseContext() , grid , deck );
|
||||
Opm::WellPtr op_1 = schedule.getWell("OP_1");
|
||||
|
||||
size_t timestep = 2;
|
||||
@ -285,8 +282,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::IOConfigPtr ioConfig;
|
||||
Opm::Schedule schedule(Opm::ParseContext() , grid , deck, ioConfig);
|
||||
Opm::Schedule schedule(Opm::ParseContext() , grid , deck );
|
||||
Opm::WellPtr op_1 = schedule.getWell("OP_1");
|
||||
|
||||
size_t timestep = 2;
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
#include <opm/parser/eclipse/Parser/ParserEnums.hpp>
|
||||
#include <opm/parser/eclipse/Units/ConversionFactors.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well.hpp>
|
||||
@ -44,8 +43,7 @@ BOOST_AUTO_TEST_CASE( parse_WCONPROD_OK ) {
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(ParseContext() , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(ParseContext() , grid , deck ));
|
||||
|
||||
BOOST_CHECK_EQUAL(5U, sched->numWells());
|
||||
BOOST_CHECK(sched->hasWell("INJE1"));
|
||||
@ -80,8 +78,7 @@ BOOST_AUTO_TEST_CASE( parse_WCONINJE_OK ) {
|
||||
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 );
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck ));
|
||||
|
||||
BOOST_CHECK_EQUAL(5U, sched->numWells());
|
||||
BOOST_CHECK(sched->hasWell("PROD1"));
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Group.hpp>
|
||||
@ -48,8 +47,7 @@ BOOST_AUTO_TEST_CASE(CreateSchedule) {
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
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());
|
||||
BOOST_CHECK_EQUAL(9U, timeMap->size());
|
||||
@ -63,8 +61,7 @@ BOOST_AUTO_TEST_CASE(CreateSchedule_Comments_After_Keywords) {
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
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());
|
||||
BOOST_CHECK_EQUAL(9U, timeMap->size());
|
||||
@ -77,8 +74,7 @@ BOOST_AUTO_TEST_CASE(WCONPROD_MissingCmode) {
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
BOOST_CHECK_NO_THROW( new Schedule(parseContext , grid , deck, ioConfig) );
|
||||
BOOST_CHECK_NO_THROW( new Schedule(parseContext , grid , deck ) );
|
||||
}
|
||||
|
||||
|
||||
@ -88,8 +84,7 @@ BOOST_AUTO_TEST_CASE(WCONPROD_Missing_DATA) {
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
BOOST_CHECK_THROW( new Schedule(parseContext , grid , deck, ioConfig) , std::invalid_argument );
|
||||
BOOST_CHECK_THROW( new Schedule(parseContext , grid , deck ) , std::invalid_argument );
|
||||
}
|
||||
|
||||
|
||||
@ -100,8 +95,7 @@ BOOST_AUTO_TEST_CASE(WellTestRefDepth) {
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(40,60,30);
|
||||
BOOST_CHECK_EQUAL(3, 3);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck ));
|
||||
BOOST_CHECK_EQUAL(4, 4);
|
||||
|
||||
WellPtr well1 = sched->getWell("W_1");
|
||||
@ -119,8 +113,7 @@ BOOST_AUTO_TEST_CASE(WellTestOpen) {
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck ));
|
||||
|
||||
auto well1 = sched->getWell( "W_1" );
|
||||
auto well2 = sched->getWell( "W_2" );
|
||||
@ -160,8 +153,7 @@ BOOST_AUTO_TEST_CASE(WellTesting) {
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck ));
|
||||
|
||||
BOOST_CHECK_EQUAL(4U, sched->numWells());
|
||||
BOOST_CHECK(sched->hasWell("W_1"));
|
||||
@ -277,8 +269,7 @@ BOOST_AUTO_TEST_CASE(WellTestCOMPDAT_DEFAULTED_ITEMS) {
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseContext , grid, deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid, deck));
|
||||
}
|
||||
|
||||
|
||||
@ -288,8 +279,7 @@ BOOST_AUTO_TEST_CASE(WellTestCOMPDAT) {
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck));
|
||||
|
||||
BOOST_CHECK_EQUAL(4U, sched->numWells());
|
||||
BOOST_CHECK(sched->hasWell("W_1"));
|
||||
@ -321,8 +311,7 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_with_explicit_L0_parenting) {
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck));
|
||||
|
||||
GroupTreeNodePtr rootNode = sched->getGroupTree(0)->getNode("FIELD");
|
||||
|
||||
@ -351,8 +340,7 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_correct) {
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr schedule(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
SchedulePtr schedule(new Schedule(parseContext , grid , deck));
|
||||
|
||||
BOOST_CHECK( schedule->hasGroup( "FIELD" ));
|
||||
BOOST_CHECK( schedule->hasGroup( "PROD" ));
|
||||
@ -371,8 +359,7 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_WELSPECS_AND_GRUPTREE_correct_iter_function)
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr schedule(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
SchedulePtr schedule(new Schedule(parseContext , grid , deck));
|
||||
|
||||
// Time 0, only from WELSPECS
|
||||
GroupTreeNodeConstPtr root = schedule->getGroupTree(0)->getNode("FIELD");
|
||||
@ -399,8 +386,7 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_WELSPECS_AND_GRUPTREE_correct_tree) {
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr schedule(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
SchedulePtr schedule(new Schedule(parseContext , grid , deck));
|
||||
|
||||
// Time 0, only from WELSPECS
|
||||
GroupTreeNodePtr root0 = schedule->getGroupTree(0)->getNode("FIELD");
|
||||
@ -445,8 +431,7 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_WITH_REPARENT_correct_tree) {
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr schedule(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
SchedulePtr schedule(new Schedule(parseContext , grid , deck));
|
||||
|
||||
|
||||
// Time , from first GRUPTREE
|
||||
@ -479,8 +464,7 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_PrintGrouptree) {
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck));
|
||||
|
||||
GroupTreePtr rootNode = sched->getGroupTree(0);
|
||||
rootNode->printTree(std::cout);
|
||||
@ -494,8 +478,7 @@ BOOST_AUTO_TEST_CASE( WellTestGroups ) {
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched( new Schedule(parseContext , grid , deck, ioConfig));
|
||||
SchedulePtr sched( new Schedule(parseContext , grid , deck));
|
||||
|
||||
BOOST_CHECK_EQUAL( 3U , sched->numGroups() );
|
||||
BOOST_CHECK( sched->hasGroup( "INJ" ));
|
||||
@ -537,8 +520,7 @@ BOOST_AUTO_TEST_CASE( WellTestGroupAndWellRelation ) {
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched( new Schedule(parseContext , grid , deck, ioConfig));
|
||||
SchedulePtr sched( new Schedule(parseContext , grid , deck));
|
||||
|
||||
GroupPtr group1 = sched->getGroup("GROUP1");
|
||||
GroupPtr group2 = sched->getGroup("GROUP2");
|
||||
@ -567,8 +549,7 @@ BOOST_AUTO_TEST_CASE(WellTestWELSPECSDataLoaded) {
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck));
|
||||
|
||||
BOOST_CHECK_EQUAL(4U, sched->numWells());
|
||||
BOOST_CHECK(sched->hasWell("W_1"));
|
||||
@ -601,8 +582,7 @@ BOOST_AUTO_TEST_CASE(WellTestWELSPECS_InvalidConfig_Throws) {
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
BOOST_CHECK_THROW(new Schedule(parseContext , grid , deck, ioConfig), std::invalid_argument);
|
||||
BOOST_CHECK_THROW(new Schedule(parseContext , grid , deck), std::invalid_argument);
|
||||
|
||||
}
|
||||
|
||||
@ -641,8 +621,7 @@ BOOST_AUTO_TEST_CASE(WellTestWGRUPCONWellPropertiesSet) {
|
||||
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 );
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck));
|
||||
|
||||
WellConstPtr well1 = sched->getWell("W_1");
|
||||
BOOST_CHECK(well1->isAvailableForGroupControl(0));
|
||||
@ -681,8 +660,7 @@ COMPDAT \n\
|
||||
/\n";
|
||||
DeckPtr deck = parser->parseString(deckString, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>( 30,30,10 );
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck));
|
||||
WellConstPtr well = sched->getWell("W1");
|
||||
CompletionSetConstPtr completions = well->getCompletions(0);
|
||||
BOOST_CHECK_EQUAL( 10 , completions->get(0)->getI() );
|
||||
@ -700,8 +678,7 @@ BOOST_AUTO_TEST_CASE(OpmCode) {
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
BOOST_CHECK_NO_THROW( new Schedule(parseContext , grid , deck, ioConfig) );
|
||||
BOOST_CHECK_NO_THROW( new Schedule(parseContext , grid , deck) );
|
||||
}
|
||||
|
||||
|
||||
@ -712,8 +689,7 @@ BOOST_AUTO_TEST_CASE(WELLS_SHUT) {
|
||||
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 );
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck));
|
||||
|
||||
|
||||
WellConstPtr well1 = sched->getWell("W1");
|
||||
@ -737,8 +713,7 @@ BOOST_AUTO_TEST_CASE(WellTestWPOLYMER) {
|
||||
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);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck));
|
||||
|
||||
|
||||
BOOST_CHECK_EQUAL(4U, sched->numWells());
|
||||
@ -787,8 +762,7 @@ BOOST_AUTO_TEST_CASE(TestEvents) {
|
||||
|
||||
DeckPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
std::shared_ptr<const EclipseGrid> grid = std::make_shared<const EclipseGrid>(40,40,30);
|
||||
IOConfigPtr ioConfig;
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck, ioConfig));
|
||||
SchedulePtr sched(new Schedule(parseContext , grid , deck));
|
||||
const Events& events = sched->getEvents();
|
||||
|
||||
BOOST_CHECK_EQUAL( true , events.hasEvent(ScheduleEvents::NEW_WELL , 0 ) );
|
||||
|
@ -34,7 +34,6 @@
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
||||
|
||||
using namespace Opm;
|
||||
|
||||
@ -137,15 +136,14 @@ 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 );
|
||||
std::shared_ptr<IOConfig> ioconfig = std::make_shared<IOConfig>();
|
||||
|
||||
parseContext.update( ParseContext::UNSUPPORTED_SCHEDULE_GEO_MODIFIER , InputError::IGNORE );
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deckSupported , ioconfig ));
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deckUnSupported , ioconfig ));
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deckSupported ));
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deckUnSupported ));
|
||||
|
||||
parseContext.update( ParseContext::UNSUPPORTED_SCHEDULE_GEO_MODIFIER , InputError::THROW_EXCEPTION );
|
||||
BOOST_CHECK_THROW( Schedule( parseContext , grid , deckUnSupported , ioconfig ), std::invalid_argument );
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deckSupported , ioconfig ));
|
||||
BOOST_CHECK_THROW( Schedule( parseContext , grid , deckUnSupported ), std::invalid_argument );
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deckSupported ));
|
||||
}
|
||||
|
||||
|
||||
@ -203,13 +201,12 @@ BOOST_AUTO_TEST_CASE(TestCOMPORD) {
|
||||
auto deck = parser.parseString( deckString , parseContext );
|
||||
|
||||
std::shared_ptr<EclipseGrid> grid = std::make_shared<EclipseGrid>( deck );
|
||||
std::shared_ptr<IOConfig> ioconfig = std::make_shared<IOConfig>();
|
||||
|
||||
parseContext.update( ParseContext::UNSUPPORTED_COMPORD_TYPE , InputError::IGNORE);
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deck , ioconfig ));
|
||||
BOOST_CHECK_NO_THROW( Schedule( parseContext , grid , deck ));
|
||||
|
||||
parseContext.update( ParseContext::UNSUPPORTED_COMPORD_TYPE , InputError::THROW_EXCEPTION);
|
||||
BOOST_CHECK_THROW( Schedule( parseContext , grid , deck , ioconfig ), std::invalid_argument );
|
||||
BOOST_CHECK_THROW( Schedule( parseContext , grid , deck ), std::invalid_argument );
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user