diff --git a/opm/core/props/pvt/ThermalGasPvtWrapper.hpp b/opm/core/props/pvt/ThermalGasPvtWrapper.hpp index 566ed87cf..b1806e67a 100644 --- a/opm/core/props/pvt/ThermalGasPvtWrapper.hpp +++ b/opm/core/props/pvt/ThermalGasPvtWrapper.hpp @@ -57,6 +57,7 @@ namespace Opm if (deck->hasKeyword("GASVISCT")) { gasvisctTables_ = &tables->getGasvisctTables(); assert(int(gasvisctTables_->size()) == numRegions); + static_cast(numRegions); //Silence compiler warning gasCompIdx_ = deck->getKeyword("GCOMPIDX")->getRecord(0)->getItem("GAS_COMPONENT_INDEX")->getInt(0) - 1; gasvisctColumnName_ = "Viscosity"+std::to_string(static_cast(gasCompIdx_)); diff --git a/opm/core/simulator/initStateEquil.hpp b/opm/core/simulator/initStateEquil.hpp index aa518f3d6..ac398b1a9 100644 --- a/opm/core/simulator/initStateEquil.hpp +++ b/opm/core/simulator/initStateEquil.hpp @@ -411,24 +411,24 @@ namespace Opm rs_func_[r], rv_func_[r], props.phaseUsage()); - PVec press = phasePressures(G, eqreg, cells, grav); + PVec pressures = phasePressures(G, eqreg, cells, grav); const std::vector& temp = temperature(G, eqreg, cells); - const PVec sat = phaseSaturations(G, eqreg, cells, props, swat_init_, press); + const PVec sat = phaseSaturations(G, eqreg, cells, props, swat_init_, pressures); const int np = props.numPhases(); for (int p = 0; p < np; ++p) { - copyFromRegion(press[p], cells, pp_[p]); + copyFromRegion(pressures[p], cells, pp_[p]); copyFromRegion(sat[p], cells, sat_[p]); } if (props.phaseUsage().phase_used[BlackoilPhases::Liquid] && props.phaseUsage().phase_used[BlackoilPhases::Vapour]) { const int oilpos = props.phaseUsage().phase_pos[BlackoilPhases::Liquid]; const int gaspos = props.phaseUsage().phase_pos[BlackoilPhases::Vapour]; - const Vec rs = computeRs(G, cells, press[oilpos], temp, *(rs_func_[r]), sat[gaspos]); - const Vec rv = computeRs(G, cells, press[gaspos], temp, *(rv_func_[r]), sat[oilpos]); - copyFromRegion(rs, cells, rs_); - copyFromRegion(rv, cells, rv_); + const Vec rs_vals = computeRs(G, cells, pressures[oilpos], temp, *(rs_func_[r]), sat[gaspos]); + const Vec rv_vals = computeRs(G, cells, pressures[gaspos], temp, *(rv_func_[r]), sat[oilpos]); + copyFromRegion(rs_vals, cells, rs_); + copyFromRegion(rv_vals, cells, rv_); } } }