mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-11 10:35:34 -06:00
Change Deck access methods/types to references
opm-parser#677 changes the return types for the Deck family of classes. This patch fixes all broken code from that patch set. https://github.com/OPM/opm-parser/pull/677
This commit is contained in:
parent
153365f4d0
commit
369050cc9c
@ -60,7 +60,7 @@ void computeMaxDp(std::map<std::pair<int, int>, double>& maxDp,
|
||||
|
||||
const int numPhases = initialState.numPhases();
|
||||
const int numCells = UgGridHelpers::numCells(grid);
|
||||
const int numPvtRegions = deck->getKeyword("TABDIMS")->getRecord(0)->getItem("NTPVT")->getInt(0);
|
||||
const int numPvtRegions = deck->getKeyword("TABDIMS").getRecord(0).getItem("NTPVT").get< int >(0);
|
||||
|
||||
// retrieve the minimum (residual!?) and the maximum saturations for all cells
|
||||
std::vector<double> minSat(numPhases*numCells);
|
||||
@ -73,26 +73,26 @@ void computeMaxDp(std::map<std::pair<int, int>, double>& maxDp,
|
||||
|
||||
// retrieve the surface densities
|
||||
std::vector<std::vector<double> > surfaceDensity(numPvtRegions);
|
||||
Opm::DeckKeywordConstPtr densityKw = deck->getKeyword("DENSITY");
|
||||
const auto& densityKw = deck->getKeyword("DENSITY");
|
||||
for (int regionIdx = 0; regionIdx < numPvtRegions; ++regionIdx) {
|
||||
surfaceDensity[regionIdx].resize(numPhases);
|
||||
|
||||
if (pu.phase_used[BlackoilPhases::Aqua]) {
|
||||
const int wpos = pu.phase_pos[BlackoilPhases::Aqua];
|
||||
surfaceDensity[regionIdx][wpos] =
|
||||
densityKw->getRecord(regionIdx)->getItem("WATER")->getSIDouble(0);
|
||||
densityKw.getRecord(regionIdx).getItem("WATER").getSIDouble(0);
|
||||
}
|
||||
|
||||
if (pu.phase_used[BlackoilPhases::Liquid]) {
|
||||
const int opos = pu.phase_pos[BlackoilPhases::Liquid];
|
||||
surfaceDensity[regionIdx][opos] =
|
||||
densityKw->getRecord(regionIdx)->getItem("OIL")->getSIDouble(0);
|
||||
densityKw.getRecord(regionIdx).getItem("OIL").getSIDouble(0);
|
||||
}
|
||||
|
||||
if (pu.phase_used[BlackoilPhases::Vapour]) {
|
||||
const int gpos = pu.phase_pos[BlackoilPhases::Vapour];
|
||||
surfaceDensity[regionIdx][gpos] =
|
||||
densityKw->getRecord(regionIdx)->getItem("GAS")->getSIDouble(0);
|
||||
densityKw.getRecord(regionIdx).getItem("GAS").getSIDouble(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user