Apply Full SWATINIT-Like PCOW Rescaling at Restart

We switch to using the applyRestartSwatInit() member function
instead of directly mutating a data member of the EpsInfo structure.
This way we defer the rescaling to a context with a more complete
view of the changes needed to convey the information to all
components involved.
This commit is contained in:
Bård Skaflestad
2023-10-25 09:12:57 +02:00
parent 70fcb864a0
commit 9fdc007c07

View File

@@ -1090,9 +1090,8 @@ public:
}
if (simulator_.vanguard().eclState().fieldProps().has_double("SWATINIT")) {
const auto& oilWaterScaledEpsInfoDrainage
= simulator.problem().materialLawManager()->oilWaterScaledEpsInfoDrainage(elemIdx);
const_cast<EclEpsScalingPointsInfo<Scalar>&>(oilWaterScaledEpsInfoDrainage).maxPcow = this->ppcw_[elemIdx];
simulator.problem().materialLawManager()
->applyRestartSwatInit(elemIdx, this->ppcw_[elemIdx]);
}
}