GenericOutputBlackoilModule: obtain data using appropriate overload

This commit is contained in:
Arne Morten Kvarving 2024-04-12 17:06:27 +02:00
parent 5914744f7c
commit aadc5cb69c
2 changed files with 3 additions and 3 deletions

View File

@ -768,7 +768,7 @@ setRestart(const data::Solution& sol,
if (!rswSol_.empty()) {
if (sol.has("RSWSOL"))
rswSol_[elemIdx] = sol.data<Scalar>("RSWSOL")[globalDofIndex];
rswSol_[elemIdx] = sol.data<double>("RSWSOL")[globalDofIndex];
}

View File

@ -1775,7 +1775,7 @@ private:
this->fip_[Inplace::Phase::CO2MassInGasPhaseMaximumTrapped][globalDofIdx] = imMobileMassGas;
}
if (!this->fip_[Inplace::Phase::CO2MassInGasPhaseMaximumUnTrapped].empty()) {
const Scalar mobileMassGas = massGas * std::max(0.0, sg - trappedGasSaturation);
const Scalar mobileMassGas = massGas * std::max(Scalar{0.0}, sg - trappedGasSaturation);
this->fip_[Inplace::Phase::CO2MassInGasPhaseMaximumUnTrapped][globalDofIdx] = mobileMassGas;
}
}
@ -1793,7 +1793,7 @@ private:
this->fip_[Inplace::Phase::CO2MassInGasPhaseEffectiveTrapped][globalDofIdx] = imMobileMassGas;
}
if (!this->fip_[Inplace::Phase::CO2MassInGasPhaseEffectiveUnTrapped].empty()) {
const Scalar mobileMassGas = massGas * std::max(0.0, sg - trappedGasSaturation);
const Scalar mobileMassGas = massGas * std::max(Scalar{0.0}, sg - trappedGasSaturation);
this->fip_[Inplace::Phase::CO2MassInGasPhaseEffectiveUnTrapped][globalDofIdx] = mobileMassGas;
}
}