mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-15 23:41:55 -06:00
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:
parent
e77cad793b
commit
a28b2bcd76
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
|
Loading…
Reference in New Issue
Block a user