mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-28 18:21:00 -06:00
Ensure intensive quantities are calculated at start of simulation.
Moving it ensures it is also done for restart simulation runs. Without this, the well model will actually initialize the IQs, but only for owned cells, not overlap/ghost cells, which caused parallel failure.
This commit is contained in:
parent
432df26ecc
commit
92538b0612
@ -148,6 +148,8 @@ public:
|
|||||||
SimulatorReport run(SimulatorTimer& timer)
|
SimulatorReport run(SimulatorTimer& timer)
|
||||||
{
|
{
|
||||||
init(timer);
|
init(timer);
|
||||||
|
// Make cache up to date. No need for updating it in elementCtx.
|
||||||
|
ebosSimulator_.model().invalidateAndUpdateIntensiveQuantities(/*timeIdx=*/0);
|
||||||
// Main simulation loop.
|
// Main simulation loop.
|
||||||
while (!timer.done()) {
|
while (!timer.done()) {
|
||||||
bool continue_looping = runStep(timer);
|
bool continue_looping = runStep(timer);
|
||||||
@ -218,8 +220,6 @@ public:
|
|||||||
ebosSimulator_.setEpisodeIndex(-1);
|
ebosSimulator_.setEpisodeIndex(-1);
|
||||||
ebosSimulator_.setEpisodeLength(0.0);
|
ebosSimulator_.setEpisodeLength(0.0);
|
||||||
ebosSimulator_.setTimeStepSize(0.0);
|
ebosSimulator_.setTimeStepSize(0.0);
|
||||||
// Make cache up to date. No need for updating it in elementCtx.
|
|
||||||
ebosSimulator_.model().invalidateAndUpdateIntensiveQuantities(/*timeIdx=*/0);
|
|
||||||
wellModel_().beginReportStep(timer.currentStepNum());
|
wellModel_().beginReportStep(timer.currentStepNum());
|
||||||
ebosSimulator_.problem().writeOutput();
|
ebosSimulator_.problem().writeOutput();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user