diff --git a/opm/material/constraintsolvers/PTFlash.hpp b/opm/material/constraintsolvers/PTFlash.hpp index e9aeb638a..d703d4552 100644 --- a/opm/material/constraintsolvers/PTFlash.hpp +++ b/opm/material/constraintsolvers/PTFlash.hpp @@ -1127,7 +1127,7 @@ protected: const bool newton_afterwards, const int verbosity) { // Determine max. iterations based on if it will be used as a standalone flash or as a pre-process to Newton (or other) method. - const int maxIterations = newton_afterwards ? 3 : 10; + const int maxIterations = newton_afterwards ? 3 : 100; // Store cout format before manipulation std::ios_base::fmtflags f(std::cout.flags()); @@ -1169,7 +1169,7 @@ protected: } // Print iteration info - if (verbosity == 2 || verbosity == 4) { + if (verbosity == 2 || verbosity >= 4) { int prec = 5; int fugWidth = (prec + 3); int convWidth = prec + 9; @@ -1184,7 +1184,7 @@ protected: } // Check convergence - if (convFugRatio.two_norm() < 1e-6){ + if (convFugRatio.two_norm() < 1e-6) { // Restore cout format std::cout.flags(f); diff --git a/opm/material/fluidsystems/ThreeComponentFluidSystem.hh b/opm/material/fluidsystems/ThreeComponentFluidSystem.hh index 5f95172ae..9b59c7029 100644 --- a/opm/material/fluidsystems/ThreeComponentFluidSystem.hh +++ b/opm/material/fluidsystems/ThreeComponentFluidSystem.hh @@ -166,7 +166,7 @@ namespace Opm { Comp2::name(), }; - assert(0 <= compIdx && compIdx < 3); + assert(compIdx < 3); return name[compIdx]; }