From dee6f683cbea2bc7a0d92037b7da02f79daf7042 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Thu, 20 Mar 2014 13:14:34 +0100 Subject: [PATCH 1/2] sim_fibo_ad: re-add ouputting of the current report step when using opm-parser in the old parser, this was called 'epoch'... --- examples/sim_fibo_ad.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/examples/sim_fibo_ad.cpp b/examples/sim_fibo_ad.cpp index 2456f9c04..961127a52 100644 --- a/examples/sim_fibo_ad.cpp +++ b/examples/sim_fibo_ad.cpp @@ -213,13 +213,20 @@ try simtimer.init(timeMap, /*beginReportStepIdx=*/0, /*endReportStepIdx=*/0); SimulatorReport fullReport; - for (size_t episodeIdx = 0; episodeIdx < timeMap->numTimesteps(); ++episodeIdx) { + for (size_t reportStepIdx = 0; reportStepIdx < timeMap->numTimesteps(); ++reportStepIdx) { + // Report on start of a report step. + std::cout << "\n" + << "---------------------------------------------------------------\n" + << "-------------- Starting report step " << reportStepIdx << " --------------\n" + << "---------------------------------------------------------------\n" + << "\n"; + WellsManager wells(eclipseState, - episodeIdx, + reportStepIdx, *grid->c_grid(), props->permeability()); - if (episodeIdx == 0) { + if (reportStepIdx == 0) { // @@@ HACK: we should really make a new well state and // properly transfer old well state to it every epoch, // since number of wells may change etc. @@ -227,10 +234,10 @@ try } simtimer.init(timeMap, - /*beginReportStepIdx=*/episodeIdx, - /*endReportStepIdx=*/episodeIdx + 1); + /*beginReportStepIdx=*/reportStepIdx, + /*endReportStepIdx=*/reportStepIdx + 1); - if (episodeIdx == 0) + if (reportStepIdx == 0) outputWriter.writeInit(simtimer, state, well_state.basicWellState()); // Create and run simulator. From 79c93953f8965f3dff1b712fc2a8661931e810fe Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Thu, 20 Mar 2014 15:43:22 +0100 Subject: [PATCH 2/2] sim_fibo_ad: don't instantiate an old parser object if USE_NEW_PARSER is set anymore I thought I included this in a previous PR. Seems like I was wrong... --- examples/sim_fibo_ad.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/examples/sim_fibo_ad.cpp b/examples/sim_fibo_ad.cpp index 2456f9c04..26e8d18a3 100644 --- a/examples/sim_fibo_ad.cpp +++ b/examples/sim_fibo_ad.cpp @@ -103,10 +103,6 @@ try #if USE_NEW_PARSER Opm::ParserPtr newParser(new Opm::Parser() ); Opm::DeckConstPtr newParserDeck = newParser->parseFile( deck_filename ); - -#warning "HACK: required until the WellsManager and the EclipseWriter don't require the old parser anymore" - std::shared_ptr deck; - deck.reset(new EclipseGridParser(deck_filename)); #else std::shared_ptr deck; deck.reset(new EclipseGridParser(deck_filename)); @@ -119,8 +115,7 @@ try grid.reset(new GridManager(*deck)); #endif -#warning "HACK: required until the WellsManager and the EclipseWriter don't require the old parser anymore" -#if 0 // USE_NEW_PARSER +#if USE_NEW_PARSER Opm::EclipseWriter outputWriter(param, newParserDeck, share_obj(*grid->c_grid())); #else Opm::EclipseWriter outputWriter(param, deck, share_obj(*grid->c_grid()));