Use EclEpsGridProperties to access SATNUM value

This commit is contained in:
Joakim Hove 2019-11-20 13:59:47 +01:00
parent 571c24d10c
commit 1faa39cff1

View File

@ -57,11 +57,10 @@ namespace Opm {
const auto& compressedToCartesianIdx = Opm::compressedToCartesian(nc, global_cell); const auto& compressedToCartesianIdx = Opm::compressedToCartesian(nc, global_cell);
scaledEpsInfo_.resize(nc); scaledEpsInfo_.resize(nc);
EclEpsGridProperties epsGridProperties(eclState, false); EclEpsGridProperties epsGridProperties(eclState, false);
const auto& satnumData = eclState.get3DProperties().getIntGridProperty("SATNUM").getData();
const std::string tag = "Scaled endpoints"; const std::string tag = "Scaled endpoints";
for (int c = 0; c < nc; ++c) { for (int c = 0; c < nc; ++c) {
const int cartIdx = compressedToCartesianIdx[c]; const int cartIdx = compressedToCartesianIdx[c];
const std::string satnumIdx = std::to_string(satnumData[cartIdx]); const std::string satnumIdx = std::to_string(epsGridProperties.satRegion(cartIdx));
std::array<int, 3> ijk; std::array<int, 3> ijk;
ijk[0] = cartIdx % dims[0]; ijk[0] = cartIdx % dims[0];
ijk[1] = (cartIdx / dims[0]) % dims[1]; ijk[1] = (cartIdx / dims[0]) % dims[1];