diff --git a/ebos/eclproblem.hh b/ebos/eclproblem.hh index f162f9a55..74fe4acb4 100644 --- a/ebos/eclproblem.hh +++ b/ebos/eclproblem.hh @@ -552,11 +552,6 @@ public: if (!deck.hasKeyword("NOGRAV") && EWOMS_GET_PARAM(TypeTag, bool, EnableGravity)) this->gravity_[dim - 1] = 9.80665; - // this is actually not fully correct: the latest occurence of VAPPARS and DRSDT - // or DRVDT up to the current time step in the schedule section counts, presence - // of VAPPARS alone is not sufficient to disable DR[SV]DT. TODO: implment support - // for this in opm-parser's Schedule object" - // deal with DRSDT const auto& eclState = simulator.vanguard().eclState(); unsigned ntpvt = eclState.runspec().tabdims().getNumPVTTables(); @@ -575,7 +570,6 @@ public: readThermalParameters_(); transmissibilities_.finishInit(); - const auto& initconfig = eclState.getInitConfig(); const auto& timeMap = simulator.vanguard().schedule().getTimeMap(); readInitialCondition_(); @@ -1827,7 +1821,7 @@ private: // Set the start time of the simulation const auto& schedule = this->simulator().vanguard().schedule(); const auto& eclState = this->simulator().vanguard().eclState(); - const auto& timeMap = this->simulator().vanguard().schedule().getTimeMap(); + const auto& timeMap = schedule.getTimeMap(); const auto& initconfig = eclState.getInitConfig(); int episodeIdx = initconfig.getRestartStep() - 1; @@ -1908,6 +1902,13 @@ private: initial(sol[elemIdx], elemCtx, /*spaceIdx=*/0, /*timeIdx=*/0); } + // make sure that the ghost and overlap entities exhibit the correct + // solution. alternatively, this could be done in the loop above by also + // considering non-interior elements. Since the initial() method might not work + // 100% correctly for such elements, let's play safe and explicitly synchronize + // using message passing. + this->model().syncOverlap(); + // this is a hack to preserve the initial fluid states initialFluidStates_ = tmpInitialFs; // make sure that the stuff which needs to be done at the beginning of an episode