Merge pull request #854 from andlaus/frankenstein_must_solve

flow_ebos: only invalidate the intensive quantities after an iteration if necessary
This commit is contained in:
Tor Harald Sandve authored and GitHub committed 2016-10-10 08:26:13 +02:00
commit 0458d9357c
1 file changed
+3 -1
+3 -1
View File
@@ -253,6 +253,9 @@ namespace Opm {
updateState(x,reservoir_state);
wellModel().updateWellState(xw, well_state);
// since the solution was changed, the cache for the intensive quantities
// are invalid
ebosSimulator_.model().invalidateIntensiveQuantitiesCache(/*timeIdx=*/0);
}
const bool failed = false; // Not needed in this model.
const int linear_iters = must_solve ? result.iterations : 0;
@@ -1012,7 +1015,6 @@ namespace Opm {
ebosSimulator_.startNextEpisode( timer.currentStepLength() );
ebosSimulator_.setEpisodeIndex( timer.reportStepNum() );
ebosSimulator_.setTimeStepIndex( timer.reportStepNum() );
ebosSimulator_.model().invalidateIntensiveQuantitiesCache(/*timeIdx=*/0);
ebosSimulator_.model().newtonMethod().setIterationIndex(iterationIdx);
static int prevEpisodeIdx = 10000;