Use active index in RelpermDiagnostic_impl

This commit is contained in:
Joakim Hove 2019-11-27 12:10:00 +01:00
parent e7a837e463
commit 6e4d5b1e12

View File

@ -59,16 +59,19 @@ namespace Opm {
EclEpsGridProperties epsGridProperties(eclState, false, compressedToCartesianIdx); EclEpsGridProperties epsGridProperties(eclState, false, compressedToCartesianIdx);
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 std::string satnumIdx = std::to_string(epsGridProperties.satRegion(c));
const std::string satnumIdx = std::to_string(epsGridProperties.satRegion(cartIdx)); std::string cellIdx;
std::array<int, 3> ijk; {
ijk[0] = cartIdx % dims[0]; std::array<int, 3> ijk;
ijk[1] = (cartIdx / dims[0]) % dims[1]; const int cartIdx = compressedToCartesianIdx[c];
ijk[2] = cartIdx / dims[0] / dims[1]; ijk[0] = cartIdx % dims[0];
const std::string cellIdx = "(" + std::to_string(ijk[0]) + ", " + ijk[1] = (cartIdx / dims[0]) % dims[1];
std::to_string(ijk[1]) + ", " + ijk[2] = cartIdx / dims[0] / dims[1];
std::to_string(ijk[2]) + ")"; cellIdx = "(" + std::to_string(ijk[0]) + ", " +
scaledEpsInfo_[c].extractScaled(eclState, epsGridProperties, cartIdx); std::to_string(ijk[1]) + ", " +
std::to_string(ijk[2]) + ")";
}
scaledEpsInfo_[c].extractScaled(eclState, epsGridProperties, c);
// SGU <= 1.0 - SWL // SGU <= 1.0 - SWL
if (scaledEpsInfo_[c].Sgu > (1.0 - scaledEpsInfo_[c].Swl + tolerance)) { if (scaledEpsInfo_[c].Sgu > (1.0 - scaledEpsInfo_[c].Swl + tolerance)) {