From aadc5cb69ce09a61337a805a39e686cc10bac2d5 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 12 Apr 2024 17:06:27 +0200 Subject: [PATCH] GenericOutputBlackoilModule: obtain data using appropriate overload --- opm/simulators/flow/GenericOutputBlackoilModule.cpp | 2 +- opm/simulators/flow/OutputBlackoilModule.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/opm/simulators/flow/GenericOutputBlackoilModule.cpp b/opm/simulators/flow/GenericOutputBlackoilModule.cpp index 949033eea..71f8319b7 100644 --- a/opm/simulators/flow/GenericOutputBlackoilModule.cpp +++ b/opm/simulators/flow/GenericOutputBlackoilModule.cpp @@ -768,7 +768,7 @@ setRestart(const data::Solution& sol, if (!rswSol_.empty()) { if (sol.has("RSWSOL")) - rswSol_[elemIdx] = sol.data("RSWSOL")[globalDofIndex]; + rswSol_[elemIdx] = sol.data("RSWSOL")[globalDofIndex]; } diff --git a/opm/simulators/flow/OutputBlackoilModule.hpp b/opm/simulators/flow/OutputBlackoilModule.hpp index 555540a8d..a3956e74c 100644 --- a/opm/simulators/flow/OutputBlackoilModule.hpp +++ b/opm/simulators/flow/OutputBlackoilModule.hpp @@ -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; } }