ebos: fix the restart mechanism

This commit is contained in:
Andreas Lauser 2015-04-08 14:25:23 +02:00
parent cc76f3bedc
commit 12dc2c6447
2 changed files with 7 additions and 9 deletions

View File

@ -125,17 +125,15 @@ class EclPeacemanWell : public BaseAuxiliaryModule<TypeTag>
DofVariables() = default; DofVariables() = default;
DofVariables(const DofVariables&) = default; DofVariables(const DofVariables&) = default;
// retrieve the solution dependent quantities from the IntensiveQuantities of the // retrieve the solution dependent quantities that are only updated at the
// model // beginning of a time step from the IntensiveQuantities of the model
void updateBeginTimestep(const IntensiveQuantities& intQuants) void updateBeginTimestep(const IntensiveQuantities& intQuants)
{ } {}
// retrieve the solution dependent quantities from the IntensiveQuantities of the // retrieve the solution dependent quantities from the IntensiveQuantities of the
// model // model
void update(const IntensiveQuantities& intQuants) void update(const IntensiveQuantities& intQuants)
{ {
permeability = intQuants.intrinsicPermeability();
const auto& fs = intQuants.fluidState(); const auto& fs = intQuants.fluidState();
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) { for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
pressure[phaseIdx] = fs.pressure(phaseIdx); pressure[phaseIdx] = fs.pressure(phaseIdx);
@ -598,7 +596,7 @@ public:
// default skin factor: 0 // default skin factor: 0
dofVars.skinFactor = 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); const auto& K = context.problem().intrinsicPermeability(context, dofIdx, /*timeIdx=*/0);
dofVars.permeability = K; dofVars.permeability = K;

View File

@ -314,7 +314,7 @@ public:
void deserialize(Restarter &res) void deserialize(Restarter &res)
{ {
// reload the current episode/report step from the deck // reload the current episode/report step from the deck
beginEpisode(); beginEpisode(/*isOnRestart=*/true);
// deserialize the wells // deserialize the wells
wellManager_.deserialize(res); wellManager_.deserialize(res);
@ -331,7 +331,7 @@ public:
/*! /*!
* \brief Called by the simulator before an episode begins. * \brief Called by the simulator before an episode begins.
*/ */
void beginEpisode() void beginEpisode(bool isOnRestart = false)
{ {
// Proceed to the next report step // Proceed to the next report step
Simulator &simulator = this->simulator(); Simulator &simulator = this->simulator();
@ -357,7 +357,7 @@ public:
} }
// set up the wells // set up the wells
wellManager_.beginEpisode(this->simulator().gridManager().eclState()); wellManager_.beginEpisode(this->simulator().gridManager().eclState(), isOnRestart);
} }
/*! /*!