Merge pull request #1077 from babrodtk/fix_gipg_error_norne

Moved computation of FIP before output to summary
This commit is contained in:
Atgeirr Flø Rasmussen 2017-02-24 11:38:02 +01:00 committed by GitHub
commit 882d243df8

View File

@ -245,6 +245,17 @@ public:
auto solver = createSolver(well_model);
// Compute orignal fluid in place if this has not been done yet
if (originalFluidInPlace.empty()) {
solver->model().convertInput(/*iterationIdx=*/0, state, ebosSimulator_ );
ebosSimulator_.model().invalidateIntensiveQuantitiesCache(/*timeIdx=*/0);
originalFluidInPlace = solver->computeFluidInPlace(fipnum);
originalFluidInPlaceTotals = FIPTotals(originalFluidInPlace, state);
FIPUnitConvert(eclState().getUnits(), originalFluidInPlace);
FIPUnitConvert(eclState().getUnits(), originalFluidInPlaceTotals);
}
// write the inital state at the report stage
if (timer.initialStep()) {
Dune::Timer perfTimer;
@ -257,17 +268,6 @@ public:
report.output_write_time += perfTimer.stop();
}
// Compute orignal fluid in place if this has not been done yet
if (originalFluidInPlace.empty()) {
solver->model().convertInput(/*iterationIdx=*/0, state, ebosSimulator_ );
ebosSimulator_.model().invalidateIntensiveQuantitiesCache(/*timeIdx=*/0);
originalFluidInPlace = solver->computeFluidInPlace(fipnum);
originalFluidInPlaceTotals = FIPTotals(originalFluidInPlace, state);
FIPUnitConvert(eclState().getUnits(), originalFluidInPlace);
FIPUnitConvert(eclState().getUnits(), originalFluidInPlaceTotals);
}
if( terminal_output_ )
{
std::ostringstream step_msg;