diff --git a/opm/core/simulator/initStateEquil.hpp b/opm/core/simulator/initStateEquil.hpp index aa9f78625..9ba625244 100644 --- a/opm/core/simulator/initStateEquil.hpp +++ b/opm/core/simulator/initStateEquil.hpp @@ -259,9 +259,7 @@ namespace Opm { const std::vector rec = getEquil(deck); const RegionMapping<> eqlmap(equilnum(deck, G)); - - calcPressII(eqlmap, rec, props, G, grav); - calcSat(eqlmap, rec, props, G, grav); + calcPressSat(eqlmap, rec, props, G, grav); } typedef std::vector PVal; @@ -279,50 +277,11 @@ namespace Opm template void - calcPressII(const RMap& reg , - const std::vector< EquilRecord >& rec , - const Opm::BlackoilPropertiesInterface& props, - const UnstructuredGrid& G , - const double grav) - { - typedef Miscibility::NoMixing NoMix; - - for (typename RMap::RegionId - r = 0, nr = reg.numRegions(); - r < nr; ++r) - { - const typename RMap::CellRange cells = reg.cells(r); - - const int repcell = *cells.begin(); - const RhoCalc calc(props, repcell); - - const EqReg eqreg(rec[r], calc, - std::make_shared(), std::make_shared(), - props.phaseUsage()); - - const PPress& res = phasePressures(G, eqreg, cells, grav); - - for (int p = 0, np = props.numPhases(); p < np; ++p) { - PVal& d = pp_[p]; - PVal::const_iterator s = res[p].begin(); - for (typename RMap::CellRange::const_iterator - c = cells.begin(), - e = cells.end(); - c != e; ++c, ++s) - { - d[*c] = *s; - } - } - } - } - - template - void - calcSat(const RMap& reg , - const std::vector< EquilRecord >& rec , - const Opm::BlackoilPropertiesInterface& props, - const UnstructuredGrid& G , - const double grav) + calcPressSat(const RMap& reg , + const std::vector< EquilRecord >& rec , + const Opm::BlackoilPropertiesInterface& props, + const UnstructuredGrid& G , + const double grav) { typedef Miscibility::NoMixing NoMix;