From 12dc2c6447aea8739da8f5e8d6b9215d140834a1 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Wed, 8 Apr 2015 14:25:23 +0200 Subject: [PATCH] ebos: fix the restart mechanism --- applications/ebos/eclpeacemanwell.hh | 10 ++++------ applications/ebos/eclproblem.hh | 6 +++--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/applications/ebos/eclpeacemanwell.hh b/applications/ebos/eclpeacemanwell.hh index 964738ca5..00bd0758f 100644 --- a/applications/ebos/eclpeacemanwell.hh +++ b/applications/ebos/eclpeacemanwell.hh @@ -125,17 +125,15 @@ class EclPeacemanWell : public BaseAuxiliaryModule DofVariables() = default; DofVariables(const DofVariables&) = default; - // retrieve the solution dependent quantities from the IntensiveQuantities of the - // model + // retrieve the solution dependent quantities that are only updated at the + // beginning of a time step from the IntensiveQuantities of the model void updateBeginTimestep(const IntensiveQuantities& intQuants) - { } + {} // retrieve the solution dependent quantities from the IntensiveQuantities of the // model void update(const IntensiveQuantities& intQuants) { - permeability = intQuants.intrinsicPermeability(); - const auto& fs = intQuants.fluidState(); for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) { pressure[phaseIdx] = fs.pressure(phaseIdx); @@ -598,7 +596,7 @@ public: // default skin factor: 0 dofVars.skinFactor = 0; - // the permeability tensor of the DOF + // the intrinsic permeability tensor of the DOF const auto& K = context.problem().intrinsicPermeability(context, dofIdx, /*timeIdx=*/0); dofVars.permeability = K; diff --git a/applications/ebos/eclproblem.hh b/applications/ebos/eclproblem.hh index bf623c0a0..36ab13608 100644 --- a/applications/ebos/eclproblem.hh +++ b/applications/ebos/eclproblem.hh @@ -314,7 +314,7 @@ public: void deserialize(Restarter &res) { // reload the current episode/report step from the deck - beginEpisode(); + beginEpisode(/*isOnRestart=*/true); // deserialize the wells wellManager_.deserialize(res); @@ -331,7 +331,7 @@ public: /*! * \brief Called by the simulator before an episode begins. */ - void beginEpisode() + void beginEpisode(bool isOnRestart = false) { // Proceed to the next report step Simulator &simulator = this->simulator(); @@ -357,7 +357,7 @@ public: } // set up the wells - wellManager_.beginEpisode(this->simulator().gridManager().eclState()); + wellManager_.beginEpisode(this->simulator().gridManager().eclState(), isOnRestart); } /*!