OutputBlackoilModule: rename ebosResid to modelResid

This commit is contained in:
Arne Morten Kvarving 2024-02-06 10:11:57 +01:00
parent acb066eac1
commit 32e1a86f4f

View File

@ -305,7 +305,7 @@ public:
return; return;
const auto& problem = elemCtx.simulator().problem(); const auto& problem = elemCtx.simulator().problem();
const auto& ebosResid = elemCtx.simulator().model().linearizer().residual(); const auto& modelResid = elemCtx.simulator().model().linearizer().residual();
for (unsigned dofIdx = 0; dofIdx < elemCtx.numPrimaryDof(/*timeIdx=*/0); ++dofIdx) { for (unsigned dofIdx = 0; dofIdx < elemCtx.numPrimaryDof(/*timeIdx=*/0); ++dofIdx) {
const auto& intQuants = elemCtx.intensiveQuantities(dofIdx, /*timeIdx=*/0); const auto& intQuants = elemCtx.intensiveQuantities(dofIdx, /*timeIdx=*/0);
const auto& fs = intQuants.fluidState(); const auto& fs = intQuants.fluidState();
@ -608,7 +608,6 @@ public:
// where it outputs rs and rv values calculated by the initialization. To be compatible we overwrite // where it outputs rs and rv values calculated by the initialization. To be compatible we overwrite
// rs and rv with the values computed in the initially. // rs and rv with the values computed in the initially.
// Volume factors, densities and viscosities need to be recalculated with the updated rs and rv values. // Volume factors, densities and viscosities need to be recalculated with the updated rs and rv values.
// This can be removed when ebos has 100% controll over output
if ((elemCtx.simulator().episodeIndex() < 0) && if ((elemCtx.simulator().episodeIndex() < 0) &&
FluidSystem::phaseIsActive(oilPhaseIdx) && FluidSystem::phaseIsActive(oilPhaseIdx) &&
FluidSystem::phaseIsActive(gasPhaseIdx)) FluidSystem::phaseIsActive(gasPhaseIdx))
@ -684,7 +683,7 @@ public:
{ {
if (!this->residual_[phaseIdx].empty()) { if (!this->residual_[phaseIdx].empty()) {
const unsigned activeCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::solventComponentIndex(phaseIdx)); const unsigned activeCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::solventComponentIndex(phaseIdx));
this->residual_[phaseIdx][globalDofIdx] = ebosResid[globalDofIdx][activeCompIdx]; this->residual_[phaseIdx][globalDofIdx] = modelResid[globalDofIdx][activeCompIdx];
} }
} }
} }