Adapt to changes in schedule interface

This commit is contained in:
Tor Harald Sandve
2018-10-17 13:34:20 +02:00
parent 4cf81c69b1
commit 08c4a4857b
13 changed files with 32 additions and 20 deletions

View File

@@ -109,7 +109,7 @@ try
schedule.reset( new Schedule(deck,
eclipseState->getInputGrid(),
eclipseState->get3DProperties(),
eclipseState->runspec().phases(),
eclipseState->runspec(),
parseContext));

View File

@@ -119,7 +119,7 @@ try
schedule.reset( new Schedule(deck,
eclipseState->getInputGrid(),
eclipseState->get3DProperties(),
eclipseState->runspec().phases(),
eclipseState->runspec(),
parseContext));
// Grid init

View File

@@ -107,7 +107,7 @@ try
Opm::ParseContext parseContext({{ ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE }});
deck.reset(new Deck(parser.parseFile(deck_filename , parseContext)));
eclipseState.reset( new EclipseState(*deck , parseContext) );
schedule.reset( new Schedule(*deck, eclipseState->getInputGrid(), eclipseState->get3DProperties(), eclipseState->runspec().phases(), parseContext ));
schedule.reset( new Schedule(*deck, eclipseState->getInputGrid(), eclipseState->get3DProperties(), eclipseState->runspec(), parseContext ));
// Grid init
grid.reset(new GridManager(eclipseState->getInputGrid()));
{

View File

@@ -108,7 +108,7 @@ try
deck.reset(new Deck(parser.parseFile(deck_filename , parseContext)));
eclipseState.reset(new Opm::EclipseState(*deck , parseContext));
schedule.reset( new Opm::Schedule(*deck, eclipseState->getInputGrid(), eclipseState->get3DProperties(), eclipseState->runspec().phases(), parseContext));
schedule.reset( new Opm::Schedule(*deck, eclipseState->getInputGrid(), eclipseState->get3DProperties(), eclipseState->runspec(), parseContext));
// Grid init
grid.reset(new GridManager(eclipseState->getInputGrid()));
{

View File

@@ -38,7 +38,7 @@ try
Opm::Parser parser;
Opm::Deck deck = parser.parseFile(file_name , parseContext);
Opm::EclipseState eclipseState(deck , parseContext);
Opm::Schedule schedule(deck, eclipseState.getInputGrid(), eclipseState.get3DProperties(), eclipseState.runspec().phases(), parseContext);
Opm::Schedule schedule(deck, eclipseState.getInputGrid(), eclipseState.get3DProperties(), eclipseState.runspec(), parseContext);
std::cout << "Done!" << std::endl;
// Setup grid

View File

@@ -167,7 +167,7 @@ int main(int argc, char** argv)
const auto& phases = runspec.phases();
std::shared_ptr<Opm::EclipseState> eclipseState = std::make_shared< Opm::EclipseState > ( *deck, parseContext );
std::shared_ptr<Opm::Schedule> schedule = std::make_shared<Opm::Schedule>(*deck, eclipseState->getInputGrid(), eclipseState->get3DProperties(), phases, parseContext);
std::shared_ptr<Opm::Schedule> schedule = std::make_shared<Opm::Schedule>(*deck, eclipseState->getInputGrid(), eclipseState->get3DProperties(), runspec, parseContext);
std::shared_ptr<Opm::SummaryConfig> summary_config = std::make_shared<Opm::SummaryConfig>(*deck, *schedule, eclipseState->getTableManager(), parseContext);
// Twophase cases
if( phases.size() == 2 ) {

View File

@@ -507,7 +507,7 @@ namespace Opm
schedule_.reset(new Schedule(*deck_,
eclipse_state_->getInputGrid(),
eclipse_state_->get3DProperties(),
eclipse_state_->runspec().phases(),
eclipse_state_->runspec(),
parseContext));
summary_config_.reset(new SummaryConfig(*deck_,
*schedule_,

View File

@@ -214,7 +214,7 @@ public:
// Run a multiple steps of the solver depending on the time step control.
solverTimer.start();
//ebosSimulator_.setEpisodeIndex(timer.reportStepNum());
wellModel.beginReportStep(timer.currentStepNum());
auto solver = createSolver(wellModel, aquifer_model);

View File

@@ -47,7 +47,8 @@ BOOST_AUTO_TEST_CASE(TestStoppedWells)
const auto& grid = eclipseState.getInputGrid();
const TableManager table ( deck );
const Eclipse3DProperties eclipseProperties ( deck , table, grid);
const Schedule sched(deck, grid, eclipseProperties, Phases(true, true, true), parseContext );
const Opm::Runspec runspec (deck);
const Schedule sched(deck, grid, eclipseProperties, runspec, parseContext );
double target_surfacerate_inj;

View File

@@ -45,7 +45,8 @@ BOOST_AUTO_TEST_CASE(AddWellsAndGroupToCollection) {
const auto& grid = eclipseState.getInputGrid();
const TableManager table ( deck );
const Eclipse3DProperties eclipseProperties ( deck , table, grid);
const Schedule sched(deck, grid, eclipseProperties, Phases(true, true, true), parseContext );
const Runspec runspec(deck);
const Schedule sched(deck, grid, eclipseProperties, runspec, parseContext );
WellCollection collection;
@@ -84,7 +85,8 @@ BOOST_AUTO_TEST_CASE(EfficiencyFactor) {
const auto& grid = eclipseState.getInputGrid();
const TableManager table ( deck );
const Eclipse3DProperties eclipseProperties ( deck , table, grid);
const Schedule sched(deck, grid, eclipseProperties, Phases(true, true, true), parseContext );
const Runspec runspec(deck);
const Schedule sched(deck, grid, eclipseProperties, runspec, parseContext );
size_t timestep = 2;
WellCollection collection;

View File

@@ -79,7 +79,8 @@ struct SetupTest {
{
const Opm::TableManager table ( deck );
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, ecl_state->getInputGrid());
schedule.reset( new Opm::Schedule(deck, ecl_state->getInputGrid(), eclipseProperties, Opm::Phases(true, true, true), parse_context ));
const Opm::Runspec runspec (deck);
schedule.reset( new Opm::Schedule(deck, ecl_state->getInputGrid(), eclipseProperties, runspec, parse_context ));
}
// Create grid.

View File

@@ -52,7 +52,8 @@ BOOST_AUTO_TEST_CASE(ConstructGroupFromWell) {
const auto& grid = eclipseState.getInputGrid();
const TableManager table ( deck );
const Eclipse3DProperties eclipseProperties ( deck , table, grid);
const Schedule sched(deck, grid, eclipseProperties, Phases(true, true, true), parseContext );
const Opm::Runspec runspec (deck);
const Schedule sched(deck, grid, eclipseProperties, runspec, parseContext );
PhaseUsage pu = phaseUsageFromDeck(eclipseState);
@@ -91,7 +92,8 @@ BOOST_AUTO_TEST_CASE(ConstructGroupFromGroup) {
const auto& grid = eclipseState.getInputGrid();
const TableManager table ( deck );
const Eclipse3DProperties eclipseProperties ( deck , table, grid);
const Schedule sched(deck, grid, eclipseProperties, Phases(true, true, true), parseContext );
const Opm::Runspec runspec (deck);
const Schedule sched(deck, grid, eclipseProperties, runspec, parseContext );
const auto& nodes = sched.getGroupTree(2);
@@ -128,7 +130,8 @@ BOOST_AUTO_TEST_CASE(EfficiencyFactor) {
const auto& grid = eclipseState.getInputGrid();
const TableManager table ( deck );
const Eclipse3DProperties eclipseProperties ( deck , table, grid);
const Schedule sched(deck, grid, eclipseProperties, Phases(true, true, true), parseContext );
const Opm::Runspec runspec (deck);
const Schedule sched(deck, grid, eclipseProperties, runspec, parseContext );
const auto& nodes = sched.getGroupTree(2);

View File

@@ -184,7 +184,8 @@ BOOST_AUTO_TEST_CASE(New_Constructor_Works) {
const auto& grid = eclipseState.getInputGrid();
const Opm::TableManager table ( deck );
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
const Opm::Schedule sched(deck, grid, eclipseProperties, Opm::Phases(true, true, true), parseContext );
const Opm::Runspec runspec (deck);
const Opm::Schedule sched(deck, grid, eclipseProperties, runspec, parseContext );
{
@@ -225,7 +226,8 @@ BOOST_AUTO_TEST_CASE(WellsEqual) {
const auto& grid = eclipseState.getInputGrid();
const Opm::TableManager table ( deck );
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
const Opm::Schedule sched(deck, grid, eclipseProperties, Opm::Phases(true, true, true), parseContext );
const Opm::Runspec runspec (deck);
const Opm::Schedule sched(deck, grid, eclipseProperties, runspec, parseContext );
Opm::WellsManager wellsManager0(eclipseState, sched, 0, *vanguard.c_grid());
@@ -245,7 +247,8 @@ BOOST_AUTO_TEST_CASE(ControlsEqual) {
const auto& grid = eclipseState.getInputGrid();
const Opm::TableManager table ( deck );
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
const Opm::Schedule sched(deck, grid, eclipseProperties, Opm::Phases(true, true, true), parseContext );
const Opm::Runspec runspec (deck);
const Opm::Schedule sched(deck, grid, eclipseProperties, runspec, parseContext );
@@ -273,7 +276,8 @@ BOOST_AUTO_TEST_CASE(WellShutOK) {
const auto& grid = eclipseState.getInputGrid();
const Opm::TableManager table ( deck );
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
const Opm::Schedule sched(deck, grid, eclipseProperties, Opm::Phases(true, true, true), parseContext );
const Opm::Runspec runspec (deck);
const Opm::Schedule sched(deck, grid, eclipseProperties, runspec, parseContext );
Opm::WellsManager wellsManager2(eclipseState, sched, 2, *vanguard.c_grid());
@@ -294,7 +298,8 @@ BOOST_AUTO_TEST_CASE(WellSTOPOK) {
const auto& grid = eclipseState.getInputGrid();
const Opm::TableManager table ( deck );
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
const Opm::Schedule sched(deck, grid, eclipseProperties, Opm::Phases(true, true, true), parseContext );
const Opm::Runspec runspec (deck);
const Opm::Schedule sched(deck, grid, eclipseProperties, runspec, parseContext );