mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-23 16:00:01 -06:00
add casts to avoid comparison to / arithmetics with enums
This commit is contained in:
parent
68a727aac8
commit
d9a3dd6f77
@ -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<Scalar>::NoDesorption) {
|
||||
if (static_cast<int>(PolymerModule::plyrockAdsorbtionIndex(elemCtx, dofIdx, timeIdx)) ==
|
||||
BlackOilPolymerParams<Scalar>::NoDesorption)
|
||||
{
|
||||
const Scalar& maxPolymerAdsorption = elemCtx.problem().maxPolymerAdsorption(elemCtx, dofIdx, timeIdx);
|
||||
polymerAdsorption_ = std::max(Evaluation(maxPolymerAdsorption) , polymerAdsorption_);
|
||||
}
|
||||
|
@ -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<Ix>(type) * static_cast<Ix>(Element::NumElem)
|
||||
+ static_cast<Ix>(element);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user