diff --git a/opm/material/common/PolynomialUtils.hpp b/opm/material/common/PolynomialUtils.hpp index ebf7c49de..5abfdc972 100644 --- a/opm/material/common/PolynomialUtils.hpp +++ b/opm/material/common/PolynomialUtils.hpp @@ -369,7 +369,7 @@ unsigned cubicRoots(SolContainer* sol, // Find one real root of a depressed cubic using hyperbolic method. Different solutions depending on // sign of p - Scalar t; + Scalar t = 0; if (p < 0) { // Help calculation Scalar theta = (1.0 / 3.0) * acosh( ((-3.0 * abs(q)) / (2.0 * p)) * sqrt(-3.0 / p) ); diff --git a/opm/material/fluidsystems/Co2BrineFluidSystem.hh b/opm/material/fluidsystems/Co2BrineFluidSystem.hh index 11d13fb00..1c8498cc6 100644 --- a/opm/material/fluidsystems/Co2BrineFluidSystem.hh +++ b/opm/material/fluidsystems/Co2BrineFluidSystem.hh @@ -177,8 +177,8 @@ namespace Opm { unsigned phaseIdx, unsigned compIdx) { - assert(0 <= phaseIdx && phaseIdx < numPhases); - assert(0 <= compIdx && compIdx < numComponents); + assert(phaseIdx < numPhases); + assert(compIdx < numComponents); LhsEval phi = PengRobinsonMixture::computeFugacityCoefficient(fluidState, paramCache, phaseIdx, compIdx); diff --git a/opm/material/fluidsystems/ThreeComponentFluidSystem.hh b/opm/material/fluidsystems/ThreeComponentFluidSystem.hh index 952573974..5497e2209 100644 --- a/opm/material/fluidsystems/ThreeComponentFluidSystem.hh +++ b/opm/material/fluidsystems/ThreeComponentFluidSystem.hh @@ -182,8 +182,8 @@ namespace Opm { unsigned phaseIdx, unsigned compIdx) { - assert(0 <= phaseIdx && phaseIdx < numPhases); - assert(0 <= compIdx && compIdx < numComponents); + assert(phaseIdx < numPhases); + assert(compIdx < numComponents); // TODO: here the derivatives for the phi are dropped. Should we keep the derivatives against the pressure // and temperature?