don't use templated get and has interface from fieldpropsmanager

it is now private
This commit is contained in:
Arne Morten Kvarving 2020-01-27 15:33:18 +01:00
parent 298f456b18
commit 7dfb45067b

View File

@ -902,11 +902,11 @@ equilnum(const Opm::EclipseState& eclipseState,
{ {
std::vector<int> eqlnum(grid.size(0), 0); std::vector<int> eqlnum(grid.size(0), 0);
if (eclipseState.fieldProps().has<int>("EQLNUM")) { if (eclipseState.fieldProps().has_int("EQLNUM")) {
const int nc = grid.size(/*codim=*/0); const int nc = grid.size(/*codim=*/0);
eqlnum.resize(nc); eqlnum.resize(nc);
const auto& e = eclipseState.fieldProps().get_global<int>("EQLNUM"); const auto& e = eclipseState.fieldProps().get_global_int("EQLNUM");
const int* gc = Opm::UgGridHelpers::globalCell(grid); const int* gc = Opm::UgGridHelpers::globalCell(grid);
for (int cell = 0; cell < nc; ++cell) { for (int cell = 0; cell < nc; ++cell) {
const int deckPos = (gc == NULL) ? cell : gc[cell]; const int deckPos = (gc == NULL) ? cell : gc[cell];
@ -942,8 +942,8 @@ public:
if (applySwatInit) { if (applySwatInit) {
const int nc = grid.size(/*codim=*/0); const int nc = grid.size(/*codim=*/0);
if (eclipseState.fieldProps().has<double>("SWATINIT")) { if (eclipseState.fieldProps().has_double("SWATINIT")) {
const std::vector<double>& swatInitEcl = eclipseState.fieldProps().get_global<double>("SWATINIT"); const std::vector<double>& swatInitEcl = eclipseState.fieldProps().get_global_double("SWATINIT");
const int* gc = Opm::UgGridHelpers::globalCell(grid); const int* gc = Opm::UgGridHelpers::globalCell(grid);
swatInit_.resize(nc); swatInit_.resize(nc);
for (int c = 0; c < nc; ++c) { for (int c = 0; c < nc; ++c) {
@ -1082,7 +1082,7 @@ private:
void updateInitialTemperature_(const Opm::EclipseState& eclState) void updateInitialTemperature_(const Opm::EclipseState& eclState)
{ {
// Get the initial temperature data // Get the initial temperature data
std::vector<double> tempiData = eclState.fieldProps().get_global<double>("TEMPI"); std::vector<double> tempiData = eclState.fieldProps().get_global_double("TEMPI");
temperature_ = tempiData; temperature_ = tempiData;
} }
@ -1105,7 +1105,7 @@ private:
std::vector<int> cellPvtRegionIdx(numCompressed); std::vector<int> cellPvtRegionIdx(numCompressed);
//Get the PVTNUM data //Get the PVTNUM data
const auto pvtnumData = eclState.fieldProps().get_global<int>("PVTNUM"); const auto pvtnumData = eclState.fieldProps().get_global_int("PVTNUM");
// Convert PVTNUM data into an array of indices for compressed cells. Remember // Convert PVTNUM data into an array of indices for compressed cells. Remember
// that Eclipse uses Fortran-style indices which start at 1 instead of 0, so we // that Eclipse uses Fortran-style indices which start at 1 instead of 0, so we
// need to subtract 1. // need to subtract 1.