diff --git a/opm/models/blackoil/blackoilpolymermodules.hh b/opm/models/blackoil/blackoilpolymermodules.hh index 7ebd31acf..dc80c5ab4 100644 --- a/opm/models/blackoil/blackoilpolymermodules.hh +++ b/opm/models/blackoil/blackoilpolymermodules.hh @@ -591,7 +591,9 @@ public: const Scalar& maxAdsorbtion = PolymerModule::plyrockMaxAdsorbtion(elemCtx, dofIdx, timeIdx); const auto& plyadsAdsorbedPolymer = PolymerModule::plyadsAdsorbedPolymer(elemCtx, dofIdx, timeIdx); polymerAdsorption_ = plyadsAdsorbedPolymer.eval(polymerConcentration_, /*extrapolate=*/true); - if (PolymerModule::plyrockAdsorbtionIndex(elemCtx, dofIdx, timeIdx) == BlackOilPolymerParams::NoDesorption) { + if (static_cast(PolymerModule::plyrockAdsorbtionIndex(elemCtx, dofIdx, timeIdx)) == + BlackOilPolymerParams::NoDesorption) + { const Scalar& maxPolymerAdsorption = elemCtx.problem().maxPolymerAdsorption(elemCtx, dofIdx, timeIdx); polymerAdsorption_ = std::max(Evaluation(maxPolymerAdsorption) , polymerAdsorption_); } diff --git a/opm/simulators/flow/RegionPhasePVAverage.cpp b/opm/simulators/flow/RegionPhasePVAverage.cpp index d7e9a04f3..e2b10473f 100644 --- a/opm/simulators/flow/RegionPhasePVAverage.cpp +++ b/opm/simulators/flow/RegionPhasePVAverage.cpp @@ -212,5 +212,6 @@ Opm::RegionPhasePoreVolAverage::valueArrayIndex(const Ix start, const AvgType type, const Element element) const { - return start + type*Element::NumElem + element; + return start + static_cast(type) * static_cast(Element::NumElem) + + static_cast(element); }