ebos: make sure that the initial well condition is only written to the summary file once

before, it could have been written multiple times if the first time
step of the simulation failed and the timestep was repeated with a
smaller step size.
This commit is contained in:
Andreas Lauser 2015-09-22 13:23:39 +02:00
parent e77cad793b
commit a28b2bcd76

View File

@ -368,10 +368,13 @@ public:
{
wellManager_.beginTimeStep();
// the initial condition, we need to write before the time step has finished.
if (this->simulator().episodeIndex() == 0)
// write the summary information after each time step
// this is a little hack to write the initial condition, which we need to do
// before the first time step has finished.
static bool initialWritten = false;
if (this->simulator().episodeIndex() == 0 && !initialWritten) {
summaryWriter_.write(wellManager_, /*isInitial=*/true);
initialWritten = true;
}
}
/*!